From 12507f80f55b1849d6300ddcf6e00aabe722e8ed Mon Sep 17 00:00:00 2001 From: Guillaume28 Date: Tue, 22 Aug 2017 15:47:44 +0200 Subject: [PATCH 01/16] #5192 New class for showing downtimes --- lib/Centreon/Object/Downtime/Downtime.php | 2 +- lib/Centreon/Object/Downtime/RtDowntime.php | 67 ++++++++++++++++ .../centreon-clapi/centreonAPI.class.php | 7 +- .../centreonRtDowntime.class.php | 79 +++++++++++++++++++ 4 files changed, 153 insertions(+), 2 deletions(-) create mode 100644 lib/Centreon/Object/Downtime/RtDowntime.php create mode 100644 www/class/centreon-clapi/centreonRtDowntime.class.php diff --git a/lib/Centreon/Object/Downtime/Downtime.php b/lib/Centreon/Object/Downtime/Downtime.php index 313d84006b7..54be5936fcd 100644 --- a/lib/Centreon/Object/Downtime/Downtime.php +++ b/lib/Centreon/Object/Downtime/Downtime.php @@ -1,6 +1,6 @@ . + * + * Linking this program statically or dynamically with other modules is making a + * combined work based on this program. Thus, the terms and conditions of the GNU + * General Public License cover the whole combination. + * + * As a special exception, the copyright holders of this program give CENTREON + * permission to link this program with independent modules to produce an executable, + * regardless of the license terms of these independent modules, and to copy and + * distribute the resulting executable under terms of CENTREON choice, provided that + * CENTREON also meet, for each linked independent module, the terms and conditions + * of the license of that module. An independent module is a module which is not + * derived from this program. If you modify this program, you may extend this + * exception to your version of the program, but you are not obliged to do so. If you + * do not wish to do so, delete this exception statement from your version. + * + * For more information : contact@centreon.com + * + */ + +require_once "Centreon/Object/Object.php"; + +/** + * Used for interacting with downtime objects + * + * @author Baldo Guillaume + */ +class Centreon_Object_RtDowntime extends Centreon_Object +{ + protected $table = "downtimes"; + protected $primaryKey = "downtime_id"; + protected $uniqueLabelField = "comment_data"; + + public function __construct() + { + parent::__construct(); + $this->db = Centreon_Db_Manager::factory('storage'); + } + + public function getRunningDowntimes() + { + $query = "SELECT author, actual_start_time , end_time, comment_data, duration, fixed " . + "FROM downtimes " . + "WHERE service_id IS NULL " . + "AND cancelled = 0 " . + "AND started = 1 " . + "AND actual_end_time IS NULL " . + "ORDER BY actual_start_time"; + return $this->getResult($query, array(), "fetchAll"); + } + +} diff --git a/www/class/centreon-clapi/centreonAPI.class.php b/www/class/centreon-clapi/centreonAPI.class.php index 03451fe7296..11cefac9506 100644 --- a/www/class/centreon-clapi/centreonAPI.class.php +++ b/www/class/centreon-clapi/centreonAPI.class.php @@ -226,6 +226,12 @@ public function __construct($user, $password, $action, $centreon_path, $options) 'class' => 'Downtime', 'export' => true ); + /* RtDowntimes */ + $this->relationObject["RTDOWNTIME"] = array( + 'module' => 'core', + 'class' => 'RtDowntime', + 'export' => true + ); /* Templates */ $this->relationObject["HTPL"] = array( 'module' => 'core', @@ -655,7 +661,6 @@ public function launchAction($exit = true) } else { $objName = ""; } - if (!isset($this->relationObject[$this->object]['class']) || !class_exists($objName)) { print "Object $this->object not found in Centreon API.\n"; return 1; diff --git a/www/class/centreon-clapi/centreonRtDowntime.class.php b/www/class/centreon-clapi/centreonRtDowntime.class.php new file mode 100644 index 00000000000..0dc81e39e9f --- /dev/null +++ b/www/class/centreon-clapi/centreonRtDowntime.class.php @@ -0,0 +1,79 @@ +. + * + * Linking this program statically or dynamically with other modules is making a + * combined work based on this program. Thus, the terms and conditions of the GNU + * General Public License cover the whole combination. + * + * As a special exception, the copyright holders of this program give CENTREON + * permission to link this program with independent modules to produce an executable, + * regardless of the license terms of these independent modules, and to copy and + * distribute the resulting executable under terms of CENTREON choice, provided that + * CENTREON also meet, for each linked independent module, the terms and conditions + * of the license of that module. An independent module is a module which is not + * derived from this program. If you modify this program, you may extend this + * exception to your version of the program, but you are not obliged to do so. If you + * do not wish to do so, delete this exception statement from your version. + * + * For more information : contact@centreon.com + * + */ + +namespace CentreonClapi; + +require_once "centreonObject.class.php"; +require_once "centreonHost.class.php"; +require_once "centreonService.class.php"; +require_once "Centreon/Object/Downtime/RtDowntime.php"; +require_once "Centreon/Object/Host/Host.php"; +require_once "Centreon/Object/Host/Group.php"; +require_once "Centreon/Object/Service/Group.php"; +require_once "Centreon/Object/Relation/Downtime/Host.php"; +require_once "Centreon/Object/Relation/Downtime/Hostgroup.php"; +require_once "Centreon/Object/Relation/Downtime/Servicegroup.php"; + +class CentreonRtDowntime extends CentreonObject +{ + public function __construct() + { + parent::__construct(); + $this->object = new \Centreon_Object_RtDowntime(); + $this->action = "RTDOWNTIME"; + } + + /** + * Display downtimes + * + * @param null $parameters + */ + public function show($params = null) + { + $params = array( + 'author', + 'actual_start_time', + 'end_time', + 'comment_data', + 'duration', + 'fixed' + ); + echo str_replace("_", " ", implode($this->delim, $params)) . "\n"; + $elements = $this->object->getRunningDowntimes(); + foreach ($elements as $tab) { + echo implode($this->delim, array_values($tab)) . "\n"; + } + } +} From 526a2eab3cfc4199add595e9ac67cd2cff3b9154 Mon Sep 17 00:00:00 2001 From: Guillaume28 Date: Thu, 31 Aug 2017 10:05:13 +0200 Subject: [PATCH 02/16] Downtime with CLAPI for host, service, hg, sg, instance --- .../centreon-clapi/centreonAPI.class.php | 2 + .../centreonRtDowntime.class.php | 304 +++++++++++++++++- .../centreon-clapi/centreonUtils.class.php | 14 + www/class/centreonExternalCommand.class.php | 63 +++- www/class/centreonHostgroups.class.php | 32 +- www/class/centreonInstance.class.php | 21 ++ www/class/centreonServicegroups.class.php | 28 ++ 7 files changed, 447 insertions(+), 17 deletions(-) diff --git a/www/class/centreon-clapi/centreonAPI.class.php b/www/class/centreon-clapi/centreonAPI.class.php index 11cefac9506..0336cbf3058 100644 --- a/www/class/centreon-clapi/centreonAPI.class.php +++ b/www/class/centreon-clapi/centreonAPI.class.php @@ -502,6 +502,7 @@ public function checkUser($useSha1 = false) } } if ($row['contact_passwd'] == $pass) { + \CentreonClapi\CentreonUtils::setUserId($row['contact_id']); return 1; } elseif ($row['contact_auth_type'] == 'ldap') { $CentreonLog = new CentreonUserLog(-1, $this->DB); @@ -514,6 +515,7 @@ public function checkUser($useSha1 = false) $row['ar_id'] ); if ($centreonAuth->checkPassword() == 1) { + \CentreonClapi\CentreonUtils::setUserId($row['contact_id']); return 1; } } diff --git a/www/class/centreon-clapi/centreonRtDowntime.class.php b/www/class/centreon-clapi/centreonRtDowntime.class.php index 0dc81e39e9f..3b31662bea8 100644 --- a/www/class/centreon-clapi/centreonRtDowntime.class.php +++ b/www/class/centreon-clapi/centreonRtDowntime.class.php @@ -45,14 +45,47 @@ require_once "Centreon/Object/Relation/Downtime/Host.php"; require_once "Centreon/Object/Relation/Downtime/Hostgroup.php"; require_once "Centreon/Object/Relation/Downtime/Servicegroup.php"; +require_once realpath(dirname(__FILE__) . '/../centreonExternalCommand.class.php'); +require_once realpath(dirname(__FILE__) . '/../centreonDB.class.php'); +require_once realpath(dirname(__FILE__) . '/../centreonUser.class.php'); +require_once realpath(dirname(__FILE__) . '/../centreonGMT.class.php'); +require_once realpath(dirname(__FILE__) . '/../centreonHostgroups.class.php'); +require_once realpath(dirname(__FILE__) . '/../centreonServicegroups.class.php'); +require_once realpath(dirname(__FILE__) . '/../centreonInstance.class.php'); class CentreonRtDowntime extends CentreonObject { + /** + * @var array + */ + protected $downtimeType = array( + 'HOST', + 'SVC', + 'HG', + 'SG', + 'INSTANCE' + ); + + /** + * @var + */ + protected $pearDBMonitoring; + + /** + * CentreonRtDowntime constructor. + */ public function __construct() { parent::__construct(); $this->object = new \Centreon_Object_RtDowntime(); + $db = new \CentreonDB('centreon'); + $this->hgObject = new \CentreonHostgroups($db); + $this->sgObject = new \CentreonServiceGroups($db); + $this->instanceObject = new \CentreonInstance($db); + $this->externalCmdObj = new \CentreonExternalCommand(); $this->action = "RTDOWNTIME"; + $this->externalCmdObj->setUserAlias(CentreonUtils::getUserName()); + $this->externalCmdObj->setUserId(CentreonUtils::getUserId()); } /** @@ -60,7 +93,7 @@ public function __construct() * * @param null $parameters */ - public function show($params = null) + public function show($parameters = null) { $params = array( 'author', @@ -76,4 +109,273 @@ public function show($params = null) echo implode($this->delim, array_values($tab)) . "\n"; } } + + /** + * @param $parameters + * @return array + * @throws CentreonClapiException + */ + private function parseParameters($action, $parameters) + { + // Permet de sécuriser les inputs pour chaque paramètre + list($type, $resource, $start, $end, $fixed, $duration, $withServices, $comment) = explode(';', $parameters); + + // Check if object type is supported + if (!in_array(strtoupper($type), $this->downtimeType)) { + throw new CentreonClapiException(self::MISSINGPARAMETER); + } + + // Check date format + $checkStart = \DateTime::createFromFormat('Y/m/d H:i',$start); + $checkEnd = \DateTime::createFromFormat('Y/m/d H:i', $end); + if (!$checkStart || !$checkEnd) { + throw new CentreonClapiException('Wrong date format, expected : YYYY/MM/DD HH:mm'); + } + + // Check if fixed is 0 or 1 + if (!preg_match('/^(0|1)$/', $fixed)) { + throw new CentreonClapiException('Bad fixed parameter (0 or 1)'); + } + + // Check duration parameters + if (($fixed == 0 && (!preg_match('/^\d+$/', $duration) || $duration <= 0)) || + $fixed == 1 && !preg_match('/(^$)||(^\d+$)/', $duration) + ) { + throw new CentreonClapiException('Bad duration parameter'); + } + + // Check if host with services + if (strtoupper($type) === 'HOST') { + if (!preg_match('/^(0|1)$/', $withServices)) { + throw new CentreonClapiException('Bad "apply to services" parameter (0 or 1)'); + } + } + + // Sécurise le commentaire pour qu'il est forcément des guillemets + $comment = escapeshellarg($comment); + + return array( + 'type' => $type, + 'resource' => $resource, + 'start' => $start, + 'end' => $end, + 'fixed' => $fixed, + 'duration' => $duration, + 'withServices' => $withServices, + 'comment' => $comment + ); + } + + /** + * @param null $parameters + */ + public function add($parameters = null) + { + $parsedParameters = $this->parseParameters($this->action, $parameters); + + // Permet que $method prenne le bon nom de methode (addHostDowntime, addSvcDowntime etc.) + $method = 'add' . ucfirst($parsedParameters['type']) . 'Downtime'; + $this->$method( + $parsedParameters['resource'], + $parsedParameters['start'], + $parsedParameters['end'], + $parsedParameters['fixed'], + $parsedParameters['duration'], + $parsedParameters['withServices'], + $parsedParameters['comment'] + ); + } + + /** + * @param $resource + * @param $start + * @param $end + * @param $fixed + * @param $duration + * @param $comment + * @param $withServices + */ + private function addHostDowntime( + $resource, + $start, + $end, + $fixed, + $duration, + $comment, + $withServices + ) { + // Vérification de l'ajout des services avec les hosts + if ($withServices === true) { + $this->externalCmdObj->addHostDowntime( + $resource, + $comment, + $start, + $end, + $fixed, + $duration, + true + ); + } else { + $this->externalCmdObj->addHostDowntime( + $resource, + $comment, + $start, + $end, + $fixed, + $duration, + $withServices + ); + } + } + + /** + * @param $resource + * @param $start + * @param $end + * @param $fixed + * @param $duration + * @param $comment + * @param $withServices + * @throws CentreonClapiException + */ + private function addSvcDowntime( + $resource, + $start, + $end, + $fixed, + $duration, + $comment, + $withServices + ) { + // Check if a backslash is present + if (preg_match('/^(.+)\|(.+)$/', $resource, $matches)) { + $this->externalCmdObj->addSvcDowntime( + $matches[1], + $matches[2], + $comment, + $start, + $end, + $fixed, + $duration, + $withServices + ); + } else { + throw new CentreonClapiException('Bad resource parameter'); + } + } + + /** + * @param $resource + * @param $start + * @param $end + * @param $fixed + * @param $duration + * @param $comment + * @param $withServices + */ + private function addHgDowntime( + $resource, + $start, + $end, + $fixed, + $duration, + $comment, + $withServices + ) { + $hostList = $this->hgObject->getHostsByHostgroupName($resource); + + // Vérification de l'ajout des services avec les hosts + if ($withServices === true) { + foreach ($hostList as $host) { + $this->externalCmdObj->addHostDowntime( + $host['host'], + $comment, + $start, + $end, + $fixed, + $duration, + true + ); + } + } else { + foreach ($hostList as $host) { + $this->externalCmdObj->addHostDowntime( + $host['host'], + $comment, + $start, + $end, + $fixed, + $duration, + $withServices + ); + } + } + } + + /** + * @param $resource + * @param $start + * @param $end + * @param $fixed + * @param $duration + * @param $comment + * @param $withServices + */ + private function addSgDowntime( + $resource, + $start, + $end, + $fixed, + $duration, + $comment, + $withServices + ) { + $serviceList = $this->sgObject->getServicesByServicegroupName($resource); + foreach ($serviceList as $service) { + $this->externalCmdObj->addSvcDowntime( + $service['host'], + $service['service'], + $comment, + $start, + $end, + $fixed, + $duration, + $withServices + ); + } + } + + /** + * @param $resource + * @param $start + * @param $end + * @param $fixed + * @param $duration + * @param $comment + * @param $withServices + */ + private function addInstanceDowntime( + $resource, + $start, + $end, + $fixed, + $duration, + $comment, + $withServices + ) { + $hostList = $this->instanceObject->getHostsByInstance($resource); + + // Ajout des services avec les hosts forcé avec le true en dernier param + foreach ($hostList as $host) { + $this->externalCmdObj->addHostDowntime( + $host['host'], + $comment, + $start, + $end, + $fixed, + $duration, + true + ); + } + } } diff --git a/www/class/centreon-clapi/centreonUtils.class.php b/www/class/centreon-clapi/centreonUtils.class.php index 0f452b5c954..ef0c5f1aa7f 100644 --- a/www/class/centreon-clapi/centreonUtils.class.php +++ b/www/class/centreon-clapi/centreonUtils.class.php @@ -47,6 +47,10 @@ class CentreonUtils */ private static $clapiUserName; + /** + * @var int + */ + private static $clapiUserId; /** * Get centreon application path @@ -151,6 +155,16 @@ public static function getUserName() return self::$clapiUserName; } + public static function getuserId() + { + return self::$clapiUserId; + } + + public static function setUserId($userId) + { + self::$clapiUserId = $userId; + } + /** * @param $password * @param $algo diff --git a/www/class/centreonExternalCommand.class.php b/www/class/centreonExternalCommand.class.php index 26b7751aef9..f0bf5d4d2f5 100644 --- a/www/class/centreonExternalCommand.class.php +++ b/www/class/centreonExternalCommand.class.php @@ -51,14 +51,17 @@ class CentreonExternalCommand protected $GMT; protected $obj; // Centreon Obj public $debug = 0; + protected $userAlias; + protected $userId; /* * Constructor */ - public function __construct($oreon) + public function __construct($oreon = null) { global $oreon; + global $centreon; $this->obj = $oreon; $this->DB = new CentreonDB(); @@ -78,6 +81,21 @@ public function __construct($oreon) */ $this->GMT = new CentreonGMT($this->DB); $this->GMT->getMyGMTFromSession(session_id(), $this->DB); + + if (!is_null($centreon)) { + $this->userId = $centreon->user->get_id(); + $this->userAlias = $centreon->user->get_alias(); + } + } + + public function setUserId($newUserId) + { + $this->userId = $newUserId; + } + + public function setUserAlias($newUserAlias) + { + $this->userAlias = $newUserAlias; } /** @@ -431,11 +449,11 @@ public function addHostDowntime( if ($hostOrCentreonTime == "0") { $start_time = $this->GMT->getUTCDateFromString( $start, - $this->GMT->getMyGTMFromUser($centreon->user->get_id()) + $this->GMT->getMyGTMFromUser($this->userId) ); $end_time = $this->GMT->getUTCDateFromString( $end, - $this->GMT->getMyGTMFromUser($centreon->user->get_id()) + $this->GMT->getMyGTMFromUser($this->userId) ); } else { $start_time = $this->GMT->getUTCDateFromString($start, $this->GMT->getUTCLocationHost($host)); @@ -453,15 +471,21 @@ public function addHostDowntime( if (!isset($duration)) { $duration = $start_time - $end_time; } + $finalHostName = ''; + if (!is_numeric($host)) { + $finalHostName .= $host; + } else { + $finalHostName .= getMyHostName($host); + } $this->setProcessCommand( - "SCHEDULE_HOST_DOWNTIME;" . getMyHostName($host) . ";" . $start_time . ";" . $end_time . - ";" . $persistant . ";0;" . $duration . ";" . $centreon->user->get_alias() . ";" . $comment, + "SCHEDULE_HOST_DOWNTIME;" . $finalHostName . ";" . $start_time . ";" . $end_time . + ";" . $persistant . ";0;" . $duration . ";" . $this->userAlias . ";" . $comment, $poller_id ); if ($withServices === true) { $this->setProcessCommand( - "SCHEDULE_HOST_SVC_DOWNTIME;" . getMyHostName($host) . ";" . $start_time . ";" . $end_time . - ";" . $persistant . ";0;" . $duration . ";" . $centreon->user->get_alias() . ";" . $comment, + "SCHEDULE_HOST_SVC_DOWNTIME;" . $finalHostName . ";" . $start_time . ";" . $end_time . + ";" . $persistant . ";0;" . $duration . ";" . $this->userAlias . ";" . $comment, $poller_id ); } @@ -495,7 +519,6 @@ public function addSvcDowntime( $centreon = $oreon; } - if (!isset($persistant) || !in_array($persistant, array('0', '1'))) { $persistant = '0'; } @@ -503,11 +526,11 @@ public function addSvcDowntime( if ($hostOrCentreonTime == "0") { $start_time = $this->GMT->getUTCDateFromString( $start, - $this->GMT->getMyGTMFromUser($centreon->user->get_id()) + $this->GMT->getMyGTMFromUser($centreon->userId) ); $end_time = $this->GMT->getUTCDateFromString( $end, - $this->GMT->getMyGTMFromUser($centreon->user->get_id()) + $this->GMT->getMyGTMFromUser($centreon->userId) ); } else { $start_time = $this->GMT->getUTCDateFromString($start, $this->GMT->getUTCLocationHost($host)); @@ -525,12 +548,28 @@ public function addSvcDowntime( if (!isset($duration)) { $duration = $start_time - $end_time; } + $finalHostName = ''; + if (!is_numeric($host)) { + $finalHostName .= $host; + } else { + $finalHostName .= getMyHostName($host); + } + $finalServiceName =''; + if (!is_numeric($service)) { + $finalServiceName .= $service; + } else { + $finalServiceName .= getMyServiceName($service); + } $this->setProcessCommand( - "SCHEDULE_SVC_DOWNTIME;" . getMyHostName($host) . ";" . getMyServiceName($service) . ";" . $start_time . - ";" . $end_time . ";" . $persistant . ";0;" . $duration . ";" . $centreon->user->get_alias() . + "SCHEDULE_SVC_DOWNTIME;" . $finalHostName . ";" . $finalServiceName . ";" . $start_time . + ";" . $end_time . ";" . $persistant . ";0;" . $duration . ";" . $this->userAlias . ";" . $comment, $poller_id ); + echo "SCHEDULE_SVC_DOWNTIME;" . $finalHostName . ";" . $finalServiceName . ";" . $start_time . + ";" . $end_time . ";" . $persistant . ";0;" . $duration . ";" . $this->userAlias . + ";" . $comment, $poller_id; + $this->write(); } } diff --git a/www/class/centreonHostgroups.class.php b/www/class/centreonHostgroups.class.php index 230cbebfe10..63bc6cca139 100644 --- a/www/class/centreonHostgroups.class.php +++ b/www/class/centreonHostgroups.class.php @@ -184,9 +184,8 @@ public function getHostgroupId($hg_name) } /** - * - * Enter description here ... - * @param $hg_id + * @param null $hg_id + * @return array|void */ public function getHostGroupHostGroups($hg_id = null) { @@ -210,7 +209,6 @@ public function getHostGroupHostGroups($hg_id = null) /** * - * Enter description here ... */ private function setHgHgCache() { @@ -339,4 +337,30 @@ public function getObjectForSelect2($values = array(), $options = array()) return $items; } + + /** + * @param $hgName + * @return array + */ + public function getHostsByHostgroupName($hgName) + { + $hostList = array(); + + $query = "SELECT host_name, host_id " . + "FROM hostgroup_relation hgr, host h, hostgroup hg " . + "WHERE hgr.host_host_id = h.host_id " . + "AND hgr.hostgroup_hg_id = hg.hg_id " . + "AND hg.hg_name = '" . $this->DB->escape($hgName) . "'"; + $result = $this->DB->query($query); + + while($elem = $result->fetchrow()) { + $hostList[] = array( + 'host' => $elem['host_name'], + 'host_id' => $elem['host_id'], + 'hg_name' => $elem[$hgName] + ); + } + + return $hostList; + } } diff --git a/www/class/centreonInstance.class.php b/www/class/centreonInstance.class.php index 9f0ef5a7755..7912393d8c0 100644 --- a/www/class/centreonInstance.class.php +++ b/www/class/centreonInstance.class.php @@ -242,4 +242,25 @@ public function getObjectForSelect2($values = array(), $options = array()) return $items; } + + public function getHostsByInstance($instanceName) + { + $instanceList = array(); + + $query = "SELECT host_name, name " . + " FROM host h, nagios_server ns, ns_host_relation nshr " . + " WHERE ns.name = '" . $this->db->escape($instanceName) . "'" . + " AND nshr.host_host_id = h.host_id " . + " ORDER BY h.host_name"; + $result = $this->db->query($query); + + while($elem = $result->fetchrow()) { + $instanceList[] = array( + 'host' => $elem['host_name'], + 'name' => $elem['instance_name'] + ); + } + + return $instanceList; + } } diff --git a/www/class/centreonServicegroups.class.php b/www/class/centreonServicegroups.class.php index 151f1cff59b..efd9b772e8e 100644 --- a/www/class/centreonServicegroups.class.php +++ b/www/class/centreonServicegroups.class.php @@ -225,4 +225,32 @@ public function getObjectForSelect2($values = array(), $options = array()) return $items; } + + /** + * @param $sgName + * @return array + */ + public function getServicesByServicegroupName($sgName) + { + $serviceList = array(); + + $query = "SELECT service_description, service_id, host_name " . + "FROM servicegroup_relation sgr, service s, servicegroup sg, host h " . + "WHERE sgr.service_service_id = s.service_id " . + "AND sgr.servicegroup_sg_id = sg.sg_id " . + "AND sgr.host_host_id = h.host_id " . + "AND sg.sg_name = '" . $this->DB->escape($sgName) . "'"; + $result = $this->DB->query($query); + + while($elem = $result->fetchrow()) { + $serviceList[] = array( + 'service' => $elem['service_description'], + 'service_id' => $elem['service_id'], + 'host' => $elem['host_name'], + 'sg_name' => $elem[$sgName] + ); + } + + return $serviceList; + } } From b655153dca2caacf9c745a8c024a236433baa076 Mon Sep 17 00:00:00 2001 From: Guillaume28 Date: Mon, 4 Sep 2017 13:36:04 +0200 Subject: [PATCH 03/16] Add newman tests --- lib/Centreon/Object/Downtime/RtDowntime.php | 1 - .../rest_api/rest_api.postman_collection.json | 515 +++++++++++++++++- .../rest_api.postman_environment.json | 48 +- .../centreonRtDowntime.class.php | 2 +- 4 files changed, 551 insertions(+), 15 deletions(-) diff --git a/lib/Centreon/Object/Downtime/RtDowntime.php b/lib/Centreon/Object/Downtime/RtDowntime.php index b7da7017479..39d31106ca0 100644 --- a/lib/Centreon/Object/Downtime/RtDowntime.php +++ b/lib/Centreon/Object/Downtime/RtDowntime.php @@ -63,5 +63,4 @@ public function getRunningDowntimes() "ORDER BY actual_start_time"; return $this->getResult($query, array(), "fetchAll"); } - } diff --git a/tests/rest_api/rest_api.postman_collection.json b/tests/rest_api/rest_api.postman_collection.json index 5559d46e462..24c19148e11 100644 --- a/tests/rest_api/rest_api.postman_collection.json +++ b/tests/rest_api/rest_api.postman_collection.json @@ -2,7 +2,7 @@ "variables": [], "info": { "name": "Centreon Web Rest API", - "_postman_id": "7e8d87c5-e220-ec4f-01f9-a531a68da178", + "_postman_id": "2fe339f0-54b9-2167-6fd3-46fbc1f292fa", "description": "", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" }, @@ -39783,7 +39783,7 @@ } ], "request": { - "url": { + "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", "host": [ @@ -39823,7 +39823,7 @@ "description": "" } ], - "body": { + "body": { "mode": "raw", "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};contact_additive_inheritance;{{hgservice_contact_additive_inheritance}}\"\n}" }, @@ -45976,7 +45976,105 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"downtime\"\n}" + "raw": "{\n \"action\": \"show\",\n \"object\": \"DOWNTIME\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List RT downtimes", + "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\";", + "", + "var jsonData = JSON.parse(responseBody);", + "var result = jsonData.result;", + "", + "var schema = {", + " \"type\": \"array\",", + " \"items\": {", + " \"type\": \"object\",", + " \"properties\": {", + " \"author\": {", + " \"type\": \"string\"", + " },", + " \"actual start time\": {", + " \"type\": \"string\"", + " },", + " \"end time\": {", + " \"type\": \"string\"", + " },", + " \"comment data\": {", + " \"type\": \"string\"", + " },", + " \"duration\": {", + " \"type\": \"string\"", + " },", + " \"fixed\": {", + " \"type\": \"string\"", + " }", + " },", + " \"additionalProperties\": false,", + " \"required\": [\"author\", \"actual start time\", \"end time\", \"comment data\", \"duration\", \"fixed\"]", + " }", + "}", + "", + "tests[\"Validate schema JSON\"] = tv4.validate(result, schema);" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\"\n}" }, "description": "" }, @@ -47000,6 +47098,403 @@ "description": "" }, "response": [] + }, + { + "name": "Addhost Realtime", + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "postman.setGlobalVariable(\"fixed\", \"1\");", + "", + "var date = new Date();", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", + " ('0' + date.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", + "", + "var dateEnd = new Date(date.setHours(date.getHours()+1));", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", + "('0' + dateEnd.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"end_time\", datetime_end);", + "" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;esx-alger-01;{{actual_start_time}};{{end_time}};1;3600;0;Faut pas renifler de la confiture sinon ça fait tousser\"\n}\n" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservice Realtime", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "postman.setGlobalVariable(\"fixed\", \"1\");", + "", + "var date = new Date();", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", + " ('0' + date.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", + "", + "var dateEnd = new Date(date.setHours(date.getHours()+1));", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", + "('0' + dateEnd.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"end_time\", datetime_end);" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;esx-alger-01|cpu;{{actual_start_time}};{{end_time}};1;3600;0;les pates de CANNNNAAAAAAAARRRRD;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhostgroup Realtime", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "postman.setGlobalVariable(\"fixed\", \"1\");", + "", + "var date = new Date();", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", + " ('0' + date.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", + "", + "var dateEnd = new Date(date.setHours(date.getHours()+1));", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", + "('0' + dateEnd.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"end_time\", datetime_end);" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HG;Databases1;{{actual_start_time}};{{end_time}};1;3600;0;les pates de CANNNNAAAAAAAARRRRD;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservicegroup Realtime", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "postman.setGlobalVariable(\"fixed\", \"1\");", + "", + "var date = new Date();", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", + " ('0' + date.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", + "", + "var dateEnd = new Date(date.setHours(date.getHours()+1));", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", + "('0' + dateEnd.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"end_time\", datetime_end);" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SG;Traffic-Europe;{{actual_start_time}};{{end_time}};1;3600;0;les pates de CANNNNAAAAAAAARRRRD;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addinstance Realtime", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "postman.setGlobalVariable(\"fixed\", \"1\");", + "", + "var date = new Date();", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", + " ('0' + date.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", + "", + "var dateEnd = new Date(date.setHours(date.getHours()+1));", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", + "('0' + dateEnd.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"end_time\", datetime_end);" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;Central;{{actual_start_time}};{{end_time}};1;3600;0;les pates de CANNNNAAAAAAAARRRRD;\"\n}" + }, + "description": "" + }, + "response": [] } ] }, @@ -55326,7 +55821,7 @@ { "listen": "test", "script": { - "type": "text/javascript", + "type": "text/javascript", "exec": [ "tests[\"Status code is 200\"] = responseCode.code === 200;" ] @@ -61830,7 +62325,7 @@ } ], "request": { - "url": { + "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", "host": [ @@ -61842,11 +62337,11 @@ "index.php" ], "query": [ - { + { "key": "action", "value": "action" }, - { + { "key": "object", "value": "centreon_clapi" } @@ -61866,7 +62361,7 @@ "value": "{{token}}" } ], - "body": { + "body": { "mode": "raw", "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" }, @@ -79122,4 +79617,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/tests/rest_api/rest_api.postman_environment.json b/tests/rest_api/rest_api.postman_environment.json index 377c811e7f0..a071d6f5bc0 100644 --- a/tests/rest_api/rest_api.postman_environment.json +++ b/tests/rest_api/rest_api.postman_environment.json @@ -3109,10 +3109,52 @@ "key": "hgservice_cg_additive_inheritance", "value": "1", "type": "text" + }, + { + "enabled": true, + "key": "author", + "value": "admin", + "type": "text" + }, + { + "enabled": true, + "key": "actual_start_time", + "value": "2017/09/04 10:54", + "type": "text" + }, + { + "enabled": true, + "key": "end_time", + "value": "2017/09/04 11:54", + "type": "text" + }, + { + "enabled": true, + "key": "comment_data", + "value": "commentaire", + "type": "text" + }, + { + "enabled": true, + "key": "duration", + "value": "3600", + "type": "text" + }, + { + "enabled": true, + "key": "fixed", + "value": "1", + "type": "text" + }, + { + "enabled": true, + "key": "withservices", + "value": "0", + "type": "text" } ], - "timestamp": 1497354245340, + "timestamp": 1504515293973, "_postman_variable_scope": "environment", - "_postman_exported_at": "2017-06-13T11:49:43.701Z", - "_postman_exported_using": "Postman/5.0.0" + "_postman_exported_at": "2017-09-04T11:25:03.903Z", + "_postman_exported_using": "Postman/5.2.0" } diff --git a/www/class/centreon-clapi/centreonRtDowntime.class.php b/www/class/centreon-clapi/centreonRtDowntime.class.php index 3b31662bea8..7386d1affa5 100644 --- a/www/class/centreon-clapi/centreonRtDowntime.class.php +++ b/www/class/centreon-clapi/centreonRtDowntime.class.php @@ -247,7 +247,7 @@ private function addSvcDowntime( $comment, $withServices ) { - // Check if a backslash is present + // Check if a pipe is present if (preg_match('/^(.+)\|(.+)$/', $resource, $matches)) { $this->externalCmdObj->addSvcDowntime( $matches[1], From 1f4e8443b6a5c1d622ba48c88ecead7c540afc86 Mon Sep 17 00:00:00 2001 From: Guillaume28 Date: Fri, 15 Sep 2017 10:27:48 +0200 Subject: [PATCH 04/16] fix(downtime): Add condition for activate host/service --- www/class/centreonHostgroups.class.php | 1 + www/class/centreonInstance.class.php | 1 + www/class/centreonServicegroups.class.php | 1 + 3 files changed, 3 insertions(+) diff --git a/www/class/centreonHostgroups.class.php b/www/class/centreonHostgroups.class.php index 63bc6cca139..dbbefcba3fb 100644 --- a/www/class/centreonHostgroups.class.php +++ b/www/class/centreonHostgroups.class.php @@ -350,6 +350,7 @@ public function getHostsByHostgroupName($hgName) "FROM hostgroup_relation hgr, host h, hostgroup hg " . "WHERE hgr.host_host_id = h.host_id " . "AND hgr.hostgroup_hg_id = hg.hg_id " . + "AND h.host_activate = '1' " . "AND hg.hg_name = '" . $this->DB->escape($hgName) . "'"; $result = $this->DB->query($query); diff --git a/www/class/centreonInstance.class.php b/www/class/centreonInstance.class.php index 7912393d8c0..b1385c1f01f 100644 --- a/www/class/centreonInstance.class.php +++ b/www/class/centreonInstance.class.php @@ -251,6 +251,7 @@ public function getHostsByInstance($instanceName) " FROM host h, nagios_server ns, ns_host_relation nshr " . " WHERE ns.name = '" . $this->db->escape($instanceName) . "'" . " AND nshr.host_host_id = h.host_id " . + " AND h.host_activate = '1' " . " ORDER BY h.host_name"; $result = $this->db->query($query); diff --git a/www/class/centreonServicegroups.class.php b/www/class/centreonServicegroups.class.php index efd9b772e8e..4096375581f 100644 --- a/www/class/centreonServicegroups.class.php +++ b/www/class/centreonServicegroups.class.php @@ -238,6 +238,7 @@ public function getServicesByServicegroupName($sgName) "FROM servicegroup_relation sgr, service s, servicegroup sg, host h " . "WHERE sgr.service_service_id = s.service_id " . "AND sgr.servicegroup_sg_id = sg.sg_id " . + "AND s.service_activate = '1' " . "AND sgr.host_host_id = h.host_id " . "AND sg.sg_name = '" . $this->DB->escape($sgName) . "'"; $result = $this->DB->query($query); From 75f470f3c6749cdc9d2169aacecc57ab52746f2d Mon Sep 17 00:00:00 2001 From: Guillaume28 Date: Mon, 18 Sep 2017 17:33:23 +0200 Subject: [PATCH 05/16] fix(tests): Midnight was in a wrong format --- tests/rest_api/rest_api.postman_collection.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/rest_api/rest_api.postman_collection.json b/tests/rest_api/rest_api.postman_collection.json index 24c19148e11..a09b3c634f3 100644 --- a/tests/rest_api/rest_api.postman_collection.json +++ b/tests/rest_api/rest_api.postman_collection.json @@ -1,8 +1,3 @@ -{ - "variables": [], - "info": { - "name": "Centreon Web Rest API", - "_postman_id": "2fe339f0-54b9-2167-6fd3-46fbc1f292fa", "description": "", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" }, @@ -47110,12 +47105,12 @@ "postman.setGlobalVariable(\"fixed\", \"1\");", "", "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + ('0' + dateEnd.getHours()).slice(-2) + \":\" + ", " ('0' + date.getMinutes()).slice(-2);", "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", "", "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + ('0' + dateEnd.getHours()).slice(-2) + \":\" + ", "('0' + dateEnd.getMinutes()).slice(-2);", "postman.setEnvironmentVariable(\"end_time\", datetime_end);", "" From 2bb1ea039e5d5a122e7195c775cd4dbd1050308f Mon Sep 17 00:00:00 2001 From: Guillaume28 Date: Wed, 20 Sep 2017 10:20:19 +0200 Subject: [PATCH 06/16] adding missing lines --- tests/rest_api/rest_api.postman_collection.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/rest_api/rest_api.postman_collection.json b/tests/rest_api/rest_api.postman_collection.json index a09b3c634f3..6648976c6bd 100644 --- a/tests/rest_api/rest_api.postman_collection.json +++ b/tests/rest_api/rest_api.postman_collection.json @@ -1,4 +1,9 @@ - "description": "", +{ +"variables": [], +"info": { +"name": "Centreon Web Rest API", +"_postman_id": "7e8d87c5-e220-ec4f-01f9-a531a68da178", +"description": "", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" }, "item": [ From 46dc2c552b705ddd8a59753e3cef5a2117112919 Mon Sep 17 00:00:00 2001 From: Guillaume28 Date: Wed, 20 Sep 2017 10:30:50 +0200 Subject: [PATCH 07/16] solves indentation problem --- tests/rest_api/rest_api.postman_collection.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/rest_api/rest_api.postman_collection.json b/tests/rest_api/rest_api.postman_collection.json index 6648976c6bd..663da17a45f 100644 --- a/tests/rest_api/rest_api.postman_collection.json +++ b/tests/rest_api/rest_api.postman_collection.json @@ -1,10 +1,10 @@ { -"variables": [], -"info": { -"name": "Centreon Web Rest API", -"_postman_id": "7e8d87c5-e220-ec4f-01f9-a531a68da178", -"description": "", - "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" + "variables": [], + "info": { + "name": "Centreon Web Rest API", + "_postman_id": "7e8d87c5-e220-ec4f-01f9-a531a68da178", + "description": "", + "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" }, "item": [ { From 83c907d67a38fc50cef0140abafe50ba3d7eb35e Mon Sep 17 00:00:00 2001 From: Guillaume28 Date: Mon, 25 Sep 2017 14:33:37 +0200 Subject: [PATCH 08/16] feature(clapi): Modify show for host and services --- lib/Centreon/Object/Downtime/RtDowntime.php | 61 +++++- .../centreonRtDowntime.class.php | 187 +++++++++++------- 2 files changed, 172 insertions(+), 76 deletions(-) diff --git a/lib/Centreon/Object/Downtime/RtDowntime.php b/lib/Centreon/Object/Downtime/RtDowntime.php index 39d31106ca0..aa99a5f9728 100644 --- a/lib/Centreon/Object/Downtime/RtDowntime.php +++ b/lib/Centreon/Object/Downtime/RtDowntime.php @@ -34,7 +34,6 @@ */ require_once "Centreon/Object/Object.php"; - /** * Used for interacting with downtime objects * @@ -43,6 +42,7 @@ class Centreon_Object_RtDowntime extends Centreon_Object { protected $table = "downtimes"; + protected $name = "downtime_name"; protected $primaryKey = "downtime_id"; protected $uniqueLabelField = "comment_data"; @@ -52,15 +52,60 @@ public function __construct() $this->db = Centreon_Db_Manager::factory('storage'); } - public function getRunningDowntimes() + /** + * @param array $hostList + * @return array + */ + public function getHostDowntimes($hostList = array()) + { + $hostFilter = ''; + + // Remplace les pipe par des virgules pour la requêtes SQL + if (!empty($hostList)) { + $hostFilter = "AND h.name IN ('" . implode("','", $hostList) . "') "; + } + + $query = "SELECT name, author, actual_start_time , end_time, comment_data, duration, fixed " . + "FROM downtimes d, hosts h " . + "WHERE d.host_id = h.host_id " . + "AND d.cancelled = 0 " . + "AND d.actual_end_time IS NULL " . + "AND service_id IS NULL " . + $hostFilter . + "ORDER BY actual_start_time"; + + return $this->getResult($query, array(), "fetchAll"); + } + + /** + * @param array $svcList + * @return array + */ + public function getSvcDowntimes($svcList = array()) { - $query = "SELECT author, actual_start_time , end_time, comment_data, duration, fixed " . - "FROM downtimes " . - "WHERE service_id IS NULL " . - "AND cancelled = 0 " . - "AND started = 1 " . - "AND actual_end_time IS NULL " . + $serviceFilter = ''; + + if (!empty($svcList)) { + $serviceFilter = 'AND ('; + $filterTab = array(); + for ($i = 0; $i < count($svcList); $i+=2) { + $hostname = $svcList[$i]; + $serviceDescription = $svcList[$i + 1]; + $filterTab[] = '(h.name = "' . $hostname . '" AND s.description = "' . $serviceDescription . '")'; + } + $serviceFilter .= implode(' AND ', $filterTab) . ') '; + } + + $query = "SELECT h.name, s.description, d.service_id, author, actual_start_time , end_time, comment_data, duration, fixed " . + "FROM downtimes d, hosts h, services s " . + "WHERE d.service_id = s.service_id " . + "AND d.host_id = s.host_id " . + "AND s.host_id = h.host_id " . + "AND d.cancelled = 0 " . + $serviceFilter . + "AND d.actual_end_time IS NULL " . "ORDER BY actual_start_time"; + return $this->getResult($query, array(), "fetchAll"); } } diff --git a/www/class/centreon-clapi/centreonRtDowntime.class.php b/www/class/centreon-clapi/centreonRtDowntime.class.php index 7386d1affa5..b5c83986a45 100644 --- a/www/class/centreon-clapi/centreonRtDowntime.class.php +++ b/www/class/centreon-clapi/centreonRtDowntime.class.php @@ -45,13 +45,13 @@ require_once "Centreon/Object/Relation/Downtime/Host.php"; require_once "Centreon/Object/Relation/Downtime/Hostgroup.php"; require_once "Centreon/Object/Relation/Downtime/Servicegroup.php"; -require_once realpath(dirname(__FILE__) . '/../centreonExternalCommand.class.php'); -require_once realpath(dirname(__FILE__) . '/../centreonDB.class.php'); -require_once realpath(dirname(__FILE__) . '/../centreonUser.class.php'); -require_once realpath(dirname(__FILE__) . '/../centreonGMT.class.php'); -require_once realpath(dirname(__FILE__) . '/../centreonHostgroups.class.php'); -require_once realpath(dirname(__FILE__) . '/../centreonServicegroups.class.php'); -require_once realpath(dirname(__FILE__) . '/../centreonInstance.class.php'); +require_once realpath(dirname(__FILE__).'/../centreonExternalCommand.class.php'); +require_once realpath(dirname(__FILE__).'/../centreonDB.class.php'); +require_once realpath(dirname(__FILE__).'/../centreonUser.class.php'); +require_once realpath(dirname(__FILE__).'/../centreonGMT.class.php'); +require_once realpath(dirname(__FILE__).'/../centreonHostgroups.class.php'); +require_once realpath(dirname(__FILE__).'/../centreonServicegroups.class.php'); +require_once realpath(dirname(__FILE__).'/../centreonInstance.class.php'); class CentreonRtDowntime extends CentreonObject { @@ -63,14 +63,9 @@ class CentreonRtDowntime extends CentreonObject 'SVC', 'HG', 'SG', - 'INSTANCE' + 'INSTANCE', ); - /** - * @var - */ - protected $pearDBMonitoring; - /** * CentreonRtDowntime constructor. */ @@ -78,38 +73,16 @@ public function __construct() { parent::__construct(); $this->object = new \Centreon_Object_RtDowntime(); - $db = new \CentreonDB('centreon'); - $this->hgObject = new \CentreonHostgroups($db); - $this->sgObject = new \CentreonServiceGroups($db); - $this->instanceObject = new \CentreonInstance($db); + $this->db = new \CentreonDB('centreon'); + $this->hgObject = new \CentreonHostgroups($this->db); + $this->sgObject = new \CentreonServiceGroups($this->db); + $this->instanceObject = new \CentreonInstance($this->db); $this->externalCmdObj = new \CentreonExternalCommand(); $this->action = "RTDOWNTIME"; $this->externalCmdObj->setUserAlias(CentreonUtils::getUserName()); $this->externalCmdObj->setUserId(CentreonUtils::getUserId()); } - /** - * Display downtimes - * - * @param null $parameters - */ - public function show($parameters = null) - { - $params = array( - 'author', - 'actual_start_time', - 'end_time', - 'comment_data', - 'duration', - 'fixed' - ); - echo str_replace("_", " ", implode($this->delim, $params)) . "\n"; - $elements = $this->object->getRunningDowntimes(); - foreach ($elements as $tab) { - echo implode($this->delim, array_values($tab)) . "\n"; - } - } - /** * @param $parameters * @return array @@ -126,7 +99,7 @@ private function parseParameters($action, $parameters) } // Check date format - $checkStart = \DateTime::createFromFormat('Y/m/d H:i',$start); + $checkStart = \DateTime::createFromFormat('Y/m/d H:i', $start); $checkEnd = \DateTime::createFromFormat('Y/m/d H:i', $end); if (!$checkStart || !$checkEnd) { throw new CentreonClapiException('Wrong date format, expected : YYYY/MM/DD HH:mm'); @@ -162,10 +135,101 @@ private function parseParameters($action, $parameters) 'fixed' => $fixed, 'duration' => $duration, 'withServices' => $withServices, - 'comment' => $comment + 'comment' => $comment, + ); + } + + /** + * @param $parameters + * @return array + */ + private function parseShowParameters($parameters) + { + list($type, $resource) = explode(';', $parameters); + + return array( + 'type' => $type, + 'resource' => $resource, ); } + /** + * @param null $parameters + */ + public function show($parameters = null) + { + $parsedParameters = $this->parseShowparameters($parameters); + + $method = 'show'.ucfirst($parsedParameters['type']); + + $this->$method($parsedParameters['resource']); + } + + /** + * @param $hostList + */ + public function showHost($hostList) + { + $fields = array( + 'host_name', + 'author', + 'actual_start_time', + 'end_time', + 'comment_data', + 'duration', + 'fixed', + ); + + echo implode($this->delim, $fields)."\n"; + + // Résultat des la recherche dans la base + $hostList = array_filter(explode('|', $hostList)); + $hostList = array_map( + function ($element) { + return $this->db->escape($element); + }, + $hostList + ); + $hostDowntimesList = $this->object->getHostDowntimes($hostList); + + foreach ($hostDowntimesList as $hostDowntimes) { + echo implode($this->delim, array_values($hostDowntimes))."\n"; + } + } + + /** + * @param $svcList + */ + public function showSvc($svcList) + { + $fields = array( + 'host_name', + 'service_name', + 'author', + 'actual_start_time', + 'end_time', + 'comment_data', + 'duration', + 'fixed', + ); + + echo implode($this->delim, $fields)."\n"; + $svcList = array_filter(explode('|', $svcList)); + $svcList = array_map( + function ($arrayElem) { + return $this->db->escape($arrayElem); + }, + $svcList + ); + + // Résultat des la recherche dans la base + $serviceDowntimesList = $this->object->getSvcDowntimes($svcList); + + foreach ($serviceDowntimesList as $hostDowntimes) { + echo implode($this->delim, array_values($hostDowntimes))."\n"; + } + } + /** * @param null $parameters */ @@ -174,7 +238,7 @@ public function add($parameters = null) $parsedParameters = $this->parseParameters($this->action, $parameters); // Permet que $method prenne le bon nom de methode (addHostDowntime, addSvcDowntime etc.) - $method = 'add' . ucfirst($parsedParameters['type']) . 'Downtime'; + $method = 'add'.ucfirst($parsedParameters['type']).'Downtime'; $this->$method( $parsedParameters['resource'], $parsedParameters['start'], @@ -201,31 +265,18 @@ private function addHostDowntime( $end, $fixed, $duration, - $comment, - $withServices + $withServices, + $comment ) { - // Vérification de l'ajout des services avec les hosts - if ($withServices === true) { - $this->externalCmdObj->addHostDowntime( - $resource, - $comment, - $start, - $end, - $fixed, - $duration, - true - ); - } else { - $this->externalCmdObj->addHostDowntime( - $resource, - $comment, - $start, - $end, - $fixed, - $duration, - $withServices - ); - } + $this->externalCmdObj->addHostDowntime( + $resource, + $comment, + $start, + $end, + $fixed, + $duration, + $withServices + ); } /** @@ -244,8 +295,8 @@ private function addSvcDowntime( $end, $fixed, $duration, - $comment, - $withServices + $withServices, + $comment ) { // Check if a pipe is present if (preg_match('/^(.+)\|(.+)$/', $resource, $matches)) { From 822950f54d3f73c2e1851d22e32b5c366e03a443 Mon Sep 17 00:00:00 2001 From: Guillaume28 Date: Tue, 26 Sep 2017 11:26:12 +0200 Subject: [PATCH 09/16] Add url in the result --- lib/Centreon/Object/Downtime/RtDowntime.php | 2 +- .../centreon-clapi/centreonObject.class.php | 23 +++++++++++++++++++ .../centreonRtDowntime.class.php | 20 ++++++++++++---- 3 files changed, 40 insertions(+), 5 deletions(-) diff --git a/lib/Centreon/Object/Downtime/RtDowntime.php b/lib/Centreon/Object/Downtime/RtDowntime.php index aa99a5f9728..47f7c4d1cd7 100644 --- a/lib/Centreon/Object/Downtime/RtDowntime.php +++ b/lib/Centreon/Object/Downtime/RtDowntime.php @@ -96,7 +96,7 @@ public function getSvcDowntimes($svcList = array()) $serviceFilter .= implode(' AND ', $filterTab) . ') '; } - $query = "SELECT h.name, s.description, d.service_id, author, actual_start_time , end_time, comment_data, duration, fixed " . + $query = "SELECT h.name, s.description, author, actual_start_time , end_time, comment_data, duration, fixed " . "FROM downtimes d, hosts h, services s " . "WHERE d.service_id = s.service_id " . "AND d.host_id = s.host_id " . diff --git a/www/class/centreon-clapi/centreonObject.class.php b/www/class/centreon-clapi/centreonObject.class.php index 857926e2187..fd511a15dd2 100644 --- a/www/class/centreon-clapi/centreonObject.class.php +++ b/www/class/centreon-clapi/centreonObject.class.php @@ -205,6 +205,29 @@ public function getObjectName($id) return ""; } + /** + * Catch the beginning of the URL + * + * @return string + * + */ + public function getBaseUrl() + { + $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? "https" : "http"; + $port = ''; + if (($protocol == 'http' && $_SERVER['SERVER_PORT'] != 80) || + ($protocol == 'https' && $_SERVER['SERVER_PORT'] != 443) + ) { + $port = ':' . $_SERVER['SERVER_PORT']; + } + $uri = 'centreon'; + if (preg_match('/^(.+)\/api/', $_SERVER['REQUEST_URI'], $matches)) { + $uri = $matches[1]; + } + + return $protocol . '://' . $_SERVER['HTTP_HOST'] . $port . $uri; + } + /** * Checks if parameters are correct diff --git a/www/class/centreon-clapi/centreonRtDowntime.class.php b/www/class/centreon-clapi/centreonRtDowntime.class.php index b5c83986a45..43701149151 100644 --- a/www/class/centreon-clapi/centreonRtDowntime.class.php +++ b/www/class/centreon-clapi/centreonRtDowntime.class.php @@ -178,6 +178,7 @@ public function showHost($hostList) 'comment_data', 'duration', 'fixed', + 'url' ); echo implode($this->delim, $fields)."\n"; @@ -190,10 +191,16 @@ function ($element) { }, $hostList ); + + // Résultat des la recherche dans la base $hostDowntimesList = $this->object->getHostDowntimes($hostList); - foreach ($hostDowntimesList as $hostDowntimes) { - echo implode($this->delim, array_values($hostDowntimes))."\n"; + foreach ($hostDowntimesList as $hostDowntime) { + $url = ''; + if (isset($_SERVER['HTTP_HOST'])) { + $url = $this->getBaseUrl() . '/' . 'main.php?p=210&search_host=' . $hostDowntime['name']; + } + echo implode($this->delim, array_values($hostDowntime)) . ';' . $url . "\n"; } } @@ -211,6 +218,7 @@ public function showSvc($svcList) 'comment_data', 'duration', 'fixed', + 'url' ); echo implode($this->delim, $fields)."\n"; @@ -225,8 +233,12 @@ function ($arrayElem) { // Résultat des la recherche dans la base $serviceDowntimesList = $this->object->getSvcDowntimes($svcList); - foreach ($serviceDowntimesList as $hostDowntimes) { - echo implode($this->delim, array_values($hostDowntimes))."\n"; + foreach ($serviceDowntimesList as $hostDowntime) { + $url = ''; + if (isset($_SERVER['HTTP_HOST'])) { + $url = $this->getBaseUrl() . '/' . 'main.php?p=210&search_host=' . $hostDowntime['name'] . '&search_service=' . $hostDowntime['description']; + } + echo implode($this->delim, array_values($hostDowntime)) . ';' . $url . "\n"; } } From cd7495ee3908bddec63a99b138cea54e085e139d Mon Sep 17 00:00:00 2001 From: Guillaume28 Date: Tue, 26 Sep 2017 13:44:38 +0200 Subject: [PATCH 10/16] New documentation for realtime downtime --- .../api/clapi/objects/realtime_downtimes.rst | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 doc/fr/api/clapi/objects/realtime_downtimes.rst diff --git a/doc/fr/api/clapi/objects/realtime_downtimes.rst b/doc/fr/api/clapi/objects/realtime_downtimes.rst new file mode 100644 index 00000000000..026ff944478 --- /dev/null +++ b/doc/fr/api/clapi/objects/realtime_downtimes.rst @@ -0,0 +1,136 @@ +========= +Realtime Downtimes +========= + +Overview +-------- + +Object name: **RTDOWNTIME** + +Show host realtime downtime +--------------------------- + +In order to list available realtime 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;start_time;end_time;comment_data;duration;fixed + generic-host;admin;1506423060;1506426660;'generic-comment';3600;1 + +Columns are the following: + +================================= =========================================================================== +Column Description +================================= =========================================================================== +Host_name Name of the host + +Author Name of the author + +Actual_start Beginning of downtime + +Actual_end End of downtime + +Comment_data Short description of the realtime downtime + +Duration Duration of Downtime + +Fixed Downtime starts and stops at the exact start and end times + +================================= =========================================================================== + +Show service realtime downtime +------------------------------ + +In order to list available realtime 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;service_name;author;start_time;end_time;comment_data;duration;fixed + generic-host;generic-service;admin;1506423060;1506426660;'generic-comment';3600;1 + +Columns are the following: + +================================= =========================================================================== +Column Description +================================= =========================================================================== +Host_name Name of the host + +Service_name Name of the service + +Author Name of the author + +Actual_start Beginning of downtime + +Actual_end End of downtime + +Comment_data Short description of the realtime downtime + +Duration Duration of Downtime + +Fixed Downtime starts and stops at the exact start and end times + +================================= =========================================================================== + +Realtime Downtime for : Addhost, addhostgroup, addservice, addservicegroup +----------------------------------------------------------- + +If you want to associate a host, host group, service or service group to a realtime downtime, use the +**ADD** action:: + + [root@centreon ~]# ./centreon -u admin -p centreon -o RTDOWNTIME -a add -v "HOST;generic_host;start_time;end_time;fixed;duration;withservices;comment" + [root@centreon ~]# ./centreon -u admin -p centreon -o RTDOWNTIME -a add -v "SVC;generic_host|generic_service;start_time;end_time;fixed;duration;withservices;comment" + [root@centreon ~]# ./centreon -u admin -p centreon -o RTDOWNTIME -a add -v "HG;generic_hostgroup;start_time;end_time;fixed;duration;withservices;comment" + [root@centreon ~]# ./centreon -u admin -p centreon -o RTDOWNTIME -a add -v "SG;generic_servicegroup;start_time;end_time;fixed;duration;withservices;comment" + +The required parameters are the following: + +========= ============================================ +Order Description +========= ============================================ +1 Value you want to associate + +2 Name of the host (Name of the service) + +3 Beginning of downtime + +4 End of downtime + +5 Downtime starts and stops at the exact start and end times (0/1) + +6 Duration of Downtime + +7 Associate services (0/1) + +8 Short description of the realtime downtime + +========= ============================================ + +Add instance realtime downtime +------------------------------ + +In order to add a new realtime downtime for a poller, use the **ADD** action:: + + [root@centreon ~]# ./centreon -u admin -p centreon -o RTDOWNTIME -a add -v "HOST;generic_poller;start_time;end_time;fixed;duration;withservices;comment" + +The required parameters are the following: + +========= ============================================ +Order Description +========= ============================================ +1 Value you want to associate + +2 Name of the poller + +3 Beginning of downtime + +4 End of downtime + +5 Downtime starts and stops at the exact start and end times (0/1) + +6 Duration of Downtime + +7 Associate services (0/1) + +8 Short description of the realtime downtime + +========= ============================================ From 8cb269f165e733d8628e78ac206a509ed42a2a9d Mon Sep 17 00:00:00 2001 From: Guillaume28 Date: Tue, 26 Sep 2017 14:32:13 +0200 Subject: [PATCH 11/16] Add api collection and modify several errors --- lib/Centreon/Object/Downtime/RtDowntime.php | 3 +- .../rest_api/rest_api.postman_collection.json | 159350 ++++++++------- .../centreonRtDowntime.class.php | 16 +- 3 files changed, 79743 insertions(+), 79626 deletions(-) diff --git a/lib/Centreon/Object/Downtime/RtDowntime.php b/lib/Centreon/Object/Downtime/RtDowntime.php index 47f7c4d1cd7..96d66af44a0 100644 --- a/lib/Centreon/Object/Downtime/RtDowntime.php +++ b/lib/Centreon/Object/Downtime/RtDowntime.php @@ -34,6 +34,7 @@ */ require_once "Centreon/Object/Object.php"; + /** * Used for interacting with downtime objects * @@ -88,7 +89,7 @@ public function getSvcDowntimes($svcList = array()) if (!empty($svcList)) { $serviceFilter = 'AND ('; $filterTab = array(); - for ($i = 0; $i < count($svcList); $i+=2) { + for ($i = 0; $i < count($svcList); $i += 2) { $hostname = $svcList[$i]; $serviceDescription = $svcList[$i + 1]; $filterTab[] = '(h.name = "' . $hostname . '" AND s.description = "' . $serviceDescription . '")'; diff --git a/tests/rest_api/rest_api.postman_collection.json b/tests/rest_api/rest_api.postman_collection.json index 663da17a45f..6aa86bfd8ff 100644 --- a/tests/rest_api/rest_api.postman_collection.json +++ b/tests/rest_api/rest_api.postman_collection.json @@ -1,79620 +1,79734 @@ { - "variables": [], - "info": { - "name": "Centreon Web Rest API", - "_postman_id": "7e8d87c5-e220-ec4f-01f9-a531a68da178", - "description": "", - "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" - }, - "item": [ - { - "name": "00-Configure_Poller", - "description": "", - "item": [ - { - "name": "Authenticate", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "postman.setEnvironmentVariable(\"token\",jsonData.authToken);" - ] - } - } - ], - "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" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/x-www-form-urlencoded" - } - ], - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "username", - "type": "text", - "value": "{{api_user}}" - }, - { - "key": "password", - "type": "text", - "value": "{{api_password}}" - } - ] - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add Instance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"instance\",\n \"values\": \"test_instance;01.02.3.04;42;nagios\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"test_instance;name;{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam localhost", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};localhost;{{instance_localhost}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ns_ip_address", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};ns_ip_address;{{instance_address}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ns_activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};ns_activate;{{instance_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam init_script", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};init_script;{{instance_init_script}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam monitoring_engine", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};monitoring_engine;{{instance_monitoring_engine}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam nagios_bin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};nagios_bin;{{instance_nagios_bin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam nagiostats_bin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};nagiostats_bin;{{instance_nagiostats_bin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam nagios_perfdata", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};nagios_perfdata;{{instance_nagios_perfdata}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ssh_port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};ssh_port;{{instance_ssh_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam centreonbroker_cfg_path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};centreonbroker_cfg_path;{{instance_broker_cfg_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam centreonbroker_module_path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};centreonbroker_module_path;{{instance_broker_module_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List instances", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var instanceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of instances\"] = instanceData;", - " var i = 0;", - " while (i < instanceData.length) {", - " if (postman.getEnvironmentVariable(\"instance_name\") == instanceData[i].name) {", - " tests[\"Body contains added instance\"] = postman.getEnvironmentVariable(\"instance_name\") == instanceData[i].name;", - " tests[\"Body contains added instance_localhost\"] = postman.getEnvironmentVariable(\"instance_localhost\") == instanceData[i].localhost;", - " tests[\"Body contains added instance_address\"] = postman.getEnvironmentVariable(\"instance_address\") == instanceData[i]['ip address'];", - " tests[\"Body contains added instance_activate\"] = postman.getEnvironmentVariable(\"instance_activate\") == instanceData[i].activate;", - " tests[\"Body contains added instance_init_script\"] = postman.getEnvironmentVariable(\"instance_init_script\") == instanceData[i]['init script'];", - " tests[\"Body contains added instance_nagios_bin\"] = postman.getEnvironmentVariable(\"instance_nagios_bin\") == instanceData[i].bin;", - " tests[\"Body contains added instance_nagiostats_bin\"] = postman.getEnvironmentVariable(\"instance_nagiostats_bin\") == instanceData[i]['stats bin'];", - " tests[\"Body contains added instance_ssh_port\"] = postman.getEnvironmentVariable(\"instance_ssh_port\") == instanceData[i]['ssh port'];", - " break;", - " }", - " i++;", - " }", - " if (i == instanceData.length)", - " tests[\"instance_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"instance\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create host2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}};{{host_name2}};0.0.0.0;;central;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create Instance-2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name2}};01.3.04.65;98;nagios\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinstance host", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinstance\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}};{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gethosts", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hostData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of hosts\"] = hostData;", - " var i = 0;", - " while (i < hostData.length) {", - " if (postman.getEnvironmentVariable(\"instance_host\") == hostData[i].name) {", - " break;", - " }", - " i++;", - " }", - " tests[\"Body contains added host\"] = postman.getEnvironmentVariable(\"instance_host\") == hostData[i].generic-active-host;", - " tests[\"Body contains added host_address\"] = postman.getEnvironmentVariable(\"host_address\") == hostData[i]['0.0.0.1'];", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"gethosts\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "01-Configure_Centreon_Engine", - "description": "", - "item": [ - { - "name": "Add resource CFG", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"resourcecfg\",\n \"values\": \"test_resourcecfg;test_value;{{instance_name}};test_comment\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get ressource id", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var resourceData = jsonData.result;", - "", - "try {", - " var i = 0;", - " while (i < resourceData.length) {", - " if (\"$test_resourcecfg$\" == resourceData[i].name) {", - " postman.setEnvironmentVariable(\"resourcecfg_id\",resourceData[i].id);", - " break;", - " }", - " i++;", - " }", - " if (i == resourceData.length)", - " tests[\"the resourcecfg was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"resourcecfg\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};name;{{rcfg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam value", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};value;{{rcfg_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};activate;{{rcfg_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};comment;{{rcfg_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam instance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};instance;{{rcfg_instance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List resource CFG", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var rcfgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of resources CFG\"] = rcfgData;", - " var i = 0;", - " var rcfgname = \"$\"+ postman.getEnvironmentVariable(\"rcfg_name\") + \"$\";", - " while (i < rcfgData.length) {", - " if (rcfgname == rcfgData[i].name) {", - " tests[\"Body contains added resource CFG\"] = rcfgname == rcfgData[i].name;", - " tests[\"Body contains added rcfg_value\"] = postman.getEnvironmentVariable(\"rcfg_value\") == rcfgData[i].value;", - " tests[\"Body contains added rcfg_comment\"] = postman.getEnvironmentVariable(\"rcfg_comment\") == rcfgData[i].comment;", - " tests[\"Body contains added rcfg_activate\"] = postman.getEnvironmentVariable(\"rcfg_activate\") == rcfgData[i].activate;", - " tests[\"Body contains added rcfg_instance\"] = postman.getEnvironmentVariable(\"rcfg_instance\") == rcfgData[i].instance;", - " break;", - " }", - " i++;", - " }", - " if (i == rcfgData.length)", - " tests[\"rcfg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"resourcecfg\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "02-Configure_Centreon_Broker", - "description": "", - "item": [ - { - "name": "Add broker", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"centbrokercfg\",\n \"values\": \"broker_test;{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"broker_test;name;{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List brokers", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var brokerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of brokers\"] = brokerData;", - " var i = 0;", - " while (i < brokerData.length) {", - " if (postman.getEnvironmentVariable(\"broker_name\") == brokerData[i]['config name']) {", - " tests[\"Body contains added broker_name\"] = postman.getEnvironmentVariable(\"broker_name\") == brokerData[i]['config name'];", - " tests[\"Body contains added instance_name\"] = postman.getEnvironmentVariable(\"instance_name\") == brokerData[i].instance;", - " break;", - " }", - " i++;", - " }", - " if (i == brokerData.length)", - " tests[\"broker_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"centbrokercfg\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam filename", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};filename;{{broker_filename}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam instance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};instance;{{instance_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_queue_max_size", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};event_queue_max_size;{{broker_event_queue_max_size}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam cache_directory", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};cache_directory;{{broker_cache_directory}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam daemon", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};daemon;{{broker_daemon}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam stats_activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};stats_activate;{{broker_stats_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam correlation_activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};correlation_activate;{{broker_correlation_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addinput ipv4", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_name_ipv4}};ipv4;1\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get input_key ipv4", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var inputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of inputs\"] = inputData;", - " var i = 0;", - " while (i < inputData.length) {", - " if (postman.getEnvironmentVariable(\"input_name_ipv4\") == inputData[i].name) {", - " postman.setEnvironmentVariable(\"input_ipv4_id\",inputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == inputData.length){", - " tests[\"input_name_ipv4 was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};buffering_timeout;{{input_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};compression;{{input_compression}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression_buffer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};compression_buffer;{{input_compression_buffer}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression_level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};compression_level;{{input_compression_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};retry_interval;{{input_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};category;{{input_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput ca_certificate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};ca_certificate;{{input_ca_certificate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput host", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};host;{{input_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput one_peer_retention_mode", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};one_peer_retention_mode;{{input_one_peer_retention_mode}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};port;{{input_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput private_key", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};private_key;{{input_private_key}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput protocol", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};protocol;{{input_protocol}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput public_cert", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};public_cert;{{input_public_cert}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput tls", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};tls;{{input_tls}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getinput ipv4", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var inputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of inputs\"] = inputData;", - " for (var i = 0; i < inputData.length; i++) {", - " switch (inputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added input_buffering_timeout\"] = postman.getEnvironmentVariable(\"input_buffering_timeout\") == inputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added input_category\"] = postman.getEnvironmentVariable(\"input_category\") == inputData[i]['parameter value'];", - " break;", - " case \"ca_certificate\":", - " tests[\"Body contains added input_ca_certificate\"] = postman.getEnvironmentVariable(\"input_ca_certificate\") == inputData[i]['parameter value'];", - " break;", - " case \"compression\":", - " tests[\"Body contains added input_compression\"] = postman.getEnvironmentVariable(\"input_compression\") == inputData[i]['parameter value'];", - " break;", - " case \"compression_buffer\":", - " tests[\"Body contains added input_compression_buffer\"] = postman.getEnvironmentVariable(\"input_compression_buffer\") == inputData[i]['parameter value'];", - " break;", - " case \"compression_level\":", - " tests[\"Body contains added input_compression_level\"] = postman.getEnvironmentVariable(\"input_compression_level\") == inputData[i]['parameter value'];", - " break;", - " case \"host\":", - " tests[\"Body contains added input_host\"] = postman.getEnvironmentVariable(\"input_host\") == inputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added input_name\"] = postman.getEnvironmentVariable(\"input_name_ipv4\") == inputData[i]['parameter value'];", - " break;", - " case \"one_peer_retention_mode\":", - " tests[\"Body contains added input_one_peer_retention_mode\"] = postman.getEnvironmentVariable(\"input_one_peer_retention_mode\") == inputData[i]['parameter value'];", - " break;", - " case \"port\":", - " tests[\"Body contains added port\"] = postman.getEnvironmentVariable(\"input_port\") == inputData[i]['parameter value'];", - " break;", - " case \"private_key\":", - " tests[\"Body contains added input_private_key\"] = postman.getEnvironmentVariable(\"input_private_key\") == inputData[i]['parameter value'];", - " break;", - " case \"protocol\":", - " tests[\"Body contains added input_protocol\"] = postman.getEnvironmentVariable(\"input_protocol\") == inputData[i]['parameter value'];", - " break;", - " case \"public_cert\":", - " tests[\"Body contains added input_public_cert\"] = postman.getEnvironmentVariable(\"input_public_cert\") == inputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added input_retry_interval\"] = postman.getEnvironmentVariable(\"input_retry_interval\") == inputData[i]['parameter value'];", - " break;", - " case \"tls\":", - " tests[\"Body contains added input_tls\"] = postman.getEnvironmentVariable(\"input_tls\") == intputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body containts added input_type\"] = \"ipv4\" == inputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addinput ipv6", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_name_ipv6}};ipv6;1\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get input_key ipv6", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var inputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of inputs\"] = inputData;", - " var i = 0;", - " while (i < inputData.length) {", - " if (postman.getEnvironmentVariable(\"input_name_ipv6\") == inputData[i].name) {", - " postman.setEnvironmentVariable(\"input_ipv6_id\",inputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == inputData.length){", - " tests[\"input_name_ipv6 was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};buffering_timeout;{{input_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};compression;{{input_compression}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression_buffer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};compression_buffer;{{input_compression_buffer}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression_level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};compression_level;{{input_compression_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};retry_interval;{{input_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};category;{{input_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput ca_certificate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};ca_certificate;{{input_ca_certificate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput host", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};host;{{input_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput one_peer_retention_mode", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};one_peer_retention_mode;{{input_one_peer_retention_mode}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};port;{{input_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput private_key", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};private_key;{{input_private_key}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput protocol", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};protocol;{{input_protocol}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput public_cert", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};public_cert;{{input_public_cert}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput tls", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};tls;{{input_tls}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getinput ipv6", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var inputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of inputs\"] = inputData;", - " for (var i = 0; i < inputData.length; i++) {", - " switch (inputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added input_buffering_timeout\"] = postman.getEnvironmentVariable(\"input_buffering_timeout\") == inputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added input_category\"] = postman.getEnvironmentVariable(\"input_category\") == inputData[i]['parameter value'];", - " break;", - " case \"ca_certificate\":", - " tests[\"Body contains added input_ca_certificate\"] = postman.getEnvironmentVariable(\"input_ca_certificate\") == inputData[i]['parameter value'];", - " break;", - " case \"compression\":", - " tests[\"Body contains added input_compression\"] = postman.getEnvironmentVariable(\"input_compression\") == inputData[i]['parameter value'];", - " break;", - " case \"compression_buffer\":", - " tests[\"Body contains added input_compression_buffer\"] = postman.getEnvironmentVariable(\"input_compression_buffer\") == inputData[i]['parameter value'];", - " break;", - " case \"compression_level\":", - " tests[\"Body contains added input_compression_level\"] = postman.getEnvironmentVariable(\"input_compression_level\") == inputData[i]['parameter value'];", - " break;", - " case \"host\":", - " tests[\"Body contains added input_host\"] = postman.getEnvironmentVariable(\"input_host\") == inputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added input_name\"] = postman.getEnvironmentVariable(\"input_name_ipv6\") == inputData[i]['parameter value'];", - " break;", - " case \"one_peer_retention_mode\":", - " tests[\"Body contains added input_one_peer_retention_mode\"] = postman.getEnvironmentVariable(\"input_one_peer_retention_mode\") == inputData[i]['parameter value'];", - " break;", - " case \"port\":", - " tests[\"Body contains added port\"] = postman.getEnvironmentVariable(\"input_port\") == inputData[i]['parameter value'];", - " break;", - " case \"private_key\":", - " tests[\"Body contains added input_private_key\"] = postman.getEnvironmentVariable(\"input_private_key\") == inputData[i]['parameter value'];", - " break;", - " case \"protocol\":", - " tests[\"Body contains added input_protocol\"] = postman.getEnvironmentVariable(\"input_protocol\") == inputData[i]['parameter value'];", - " break;", - " case \"public_cert\":", - " tests[\"Body contains added input_public_cert\"] = postman.getEnvironmentVariable(\"input_public_cert\") == inputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added input_retry_interval\"] = postman.getEnvironmentVariable(\"input_retry_interval\") == inputData[i]['parameter value'];", - " break;", - " case \"tls\":", - " tests[\"Body contains added input_tls\"] = postman.getEnvironmentVariable(\"input_tls\") == intputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body containts added input_type\"] = \"ipv6\" == inputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addinput file", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_name_file}};file;1\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get input_key file", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var inputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of inputs\"] = inputData;", - " var i = 0;", - " while (i < inputData.length) {", - " if (postman.getEnvironmentVariable(\"input_name_file\") == inputData[i].name) {", - " postman.setEnvironmentVariable(\"input_file_id\",inputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == inputData.length){", - " tests[\"input_name_file was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};buffering_timeout;{{input_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};compression;{{input_compression}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression_buffer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};compression_buffer;{{input_compression_buffer}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression_level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};compression_level;{{input_compression_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};retry_interval;{{input_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput protocol", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};protocol;{{input_protocol}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput max_size", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};max_size;{{input_max_size}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};path;{{input_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getinput file", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var inputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of inputs\"] = inputData;", - " for (var i = 0; i < inputData.length; i++) {", - " switch (inputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added input_buffering_timeout\"] = postman.getEnvironmentVariable(\"input_buffering_timeout\") == inputData[i]['parameter value'];", - " break;", - " case \"compression\":", - " tests[\"Body contains added input_compression\"] = postman.getEnvironmentVariable(\"input_compression\") == inputData[i]['parameter value'];", - " break;", - " case \"compression_buffer\":", - " tests[\"Body contains added input_compression_buffer\"] = postman.getEnvironmentVariable(\"input_compression_buffer\") == inputData[i]['parameter value'];", - " break;", - " case \"compression_level\":", - " tests[\"Body contains added input_compression_level\"] = postman.getEnvironmentVariable(\"input_compression_level\") == inputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added input_name\"] = postman.getEnvironmentVariable(\"input_name_file\") == inputData[i]['parameter value'];", - " break;", - " case \"protocol\":", - " tests[\"Body contains added input_protocol\"] = postman.getEnvironmentVariable(\"input_protocol\") == inputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added input_retry_interval\"] = postman.getEnvironmentVariable(\"input_retry_interval\") == inputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added input_type\"] = \"file\" == inputData[i]['parameter value'];", - " break;", - " case \"max_size\":", - " tests[\"Body contains added input_max_size\"] = postman.getEnvironmentVariable(\"input_max_size\") == inputData[i]['parameter value'];", - " break;", - " case \"path\":", - " tests[\"Body contains added input_path\"] = postman.getEnvironmentVariable(\"input_path\") == inputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addlogger file", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};logger_file_test;file;2\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get logger_key file", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " var i = 0;", - " while (i < loggerData.length) {", - " if (\"logger_file_test\" == loggerData[i].name) {", - " postman.setEnvironmentVariable(\"logger_file_id\",loggerData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == loggerData.length){", - " tests[\"logger_file_test was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger config", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};config;{{logger_config}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger debug", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};debug;{{logger_debug}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger error", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};error;{{logger_error}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};info;{{logger_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};level;{{logger_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger max_size", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};max_size;{{logger_max_size}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};name;{{logger_name_file}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getlogger file", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " for (var i = 0; i < loggerData.length; i++) {", - " switch (loggerData[i]['parameter key'])", - " {", - " case \"config\":", - " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", - " break;", - " case \"debug\":", - " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", - " break;", - " case \"error\":", - " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", - " break;", - " case \"info\":", - " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_file\") == loggerData[i]['parameter value'];", - " break;", - " case \"level\":", - " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added logger_type\"] = \"file\" == loggerData[i]['parameter value'];", - " break;", - " case \"max_size\":", - " tests[\"Body contains added logger_max_size\"] = postman.getEnvironmentVariable(\"logger_max_size\") == loggerData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addlogger standard", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};logger_standard_test;standard;2\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get logger_key standard", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " var i = 0;", - " while (i < loggerData.length) {", - " if (\"logger_standard_test\" == loggerData[i].name) {", - " postman.setEnvironmentVariable(\"logger_standard_id\",loggerData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == loggerData.length){", - " tests[\"logger_standard_test was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger config", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};config;{{logger_config}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger debug", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};debug;{{logger_debug}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger error", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};error;{{logger_error}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};info;{{logger_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};level;{{logger_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};name;{{logger_name_standard}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getlogger standard", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " for (var i = 0; i < loggerData.length; i++) {", - " switch (loggerData[i]['parameter key'])", - " {", - " case \"config\":", - " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", - " break;", - " case \"debug\":", - " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", - " break;", - " case \"error\":", - " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", - " break;", - " case \"info\":", - " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_standard\") == loggerData[i]['parameter value'];", - " break;", - " case \"level\":", - " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added logger_type\"] = \"standard\" == loggerData[i]['parameter value'];", - " break;", - " case \"max_size\":", - " tests[\"Body contains added logger_max_size\"] = postman.getEnvironmentVariable(\"logger_max_size\") == loggerData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addlogger syslog", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_name_syslog}};syslog;2\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get logger_key syslog", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " var i = 0;", - " while (i < loggerData.length) {", - " if (postman.getEnvironmentVariable(\"logger_name_syslog\") == loggerData[i].name) {", - " postman.setEnvironmentVariable(\"logger_syslog_id\",loggerData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == loggerData.length){", - " tests[\"logger_name_syslog was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger config", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};config;{{logger_config}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger debug", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};debug;{{logger_debug}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger error", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};error;{{logger_error}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};info;{{logger_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};level;{{logger_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getlogger syslog", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " for (var i = 0; i < loggerData.length; i++) {", - " switch (loggerData[i]['parameter key'])", - " {", - " case \"config\":", - " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", - " break;", - " case \"debug\":", - " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", - " break;", - " case \"error\":", - " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", - " break;", - " case \"info\":", - " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_syslog\") == loggerData[i]['parameter value'];", - " break;", - " case \"level\":", - " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added logger_type\"] = \"syslog\" == loggerData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addlogger monitoring", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};logger_monitoring_test;monitoring;2\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get logger_key monitoring", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " var i = 0;", - " while (i < loggerData.length) {", - " if (\"logger_monitoring_test\" == loggerData[i].name) {", - " postman.setEnvironmentVariable(\"logger_monitoring_id\",loggerData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == loggerData.length){", - " tests[\"logger_monitoring_test was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger config", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};config;{{logger_config}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger debug", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};debug;{{logger_debug}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger error", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};error;{{logger_error}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};info;{{logger_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};level;{{logger_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};name;{{logger_name_monitoring}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getlogger monitoring", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " for (var i = 0; i < loggerData.length; i++) {", - " switch (loggerData[i]['parameter key'])", - " {", - " case \"config\":", - " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", - " break;", - " case \"debug\":", - " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", - " break;", - " case \"error\":", - " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", - " break;", - " case \"info\":", - " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_monitoring\") == loggerData[i]['parameter value'];", - " break;", - " case \"level\":", - " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added logger_type\"] = \"monitoring\" == loggerData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addoutput ipv4", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_ipv4}};ipv4;4\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get output_key ipv4", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " var i = 0;", - " while (i < outputData.length) {", - " if (postman.getEnvironmentVariable(\"output_name_ipv4\") == outputData[i].name) {", - " postman.setEnvironmentVariable(\"output_ipv4_id\",outputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == outputData.length){", - " tests[\"output_name_ipv4 was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};compression;{{output_compression}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression_buffer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};compression_buffer;{{output_compression_buffer}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression_level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};compression_level;{{output_compression_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput failover", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};failover;{{output_failover}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};retry_interval;{{output_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};category;{{output_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput ca_certificate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};ca_certificate;{{output_ca_certificate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput host", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};host;{{output_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput one_peer_retention_mode", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};one_peer_retention_mode;{{output_one_peer_retention_mode}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};port;{{output_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput private_key", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};private_key;{{output_private_key}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput protocol", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};protocol;{{output_protocol}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput public_cert", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};public_cert;{{output_public_cert}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput tls", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};tls;{{output_tls}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getoutput ipv4", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " for (var i = 0; i < outputData.length; i++) {", - " switch (outputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", - " break;", - " case \"ca_certificate\":", - " tests[\"Body contains added output_ca_certificate\"] = postman.getEnvironmentVariable(\"output_ca_certificate\") == outputData[i]['parameter value'];", - " break;", - " case \"compression\":", - " tests[\"Body contains added output_compression\"] = postman.getEnvironmentVariable(\"output_compression\") == outputData[i]['parameter value'];", - " break;", - " case \"compression_buffer\":", - " tests[\"Body contains added output_compression_buffer\"] = postman.getEnvironmentVariable(\"output_compression_buffer\") == outputData[i]['parameter value'];", - " break;", - " case \"compression_level\":", - " tests[\"Body contains added output_compression_level\"] = postman.getEnvironmentVariable(\"output_compression_level\") == outputData[i]['parameter value'];", - " break;", - " case \"failover\":", - " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", - " break;", - " case \"host\":", - " tests[\"Body contains added output_host\"] = postman.getEnvironmentVariable(\"output_host\") == outputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_ipv4\") == outputData[i]['parameter value'];", - " break;", - " case \"one_peer_retention_mode\":", - " tests[\"Body contains added output_one_peer_retention\"] = postman.getEnvironmentVariable(\"output_one_peer_retention_mode\") == outputData[i]['parameter value'];", - " break;", - " case \"port\":", - " tests[\"Body contains added output_port\"] = postman.getEnvironmentVariable(\"output_port\") == outputData[i]['parameter value'];", - " break;", - " case \"private_key\":", - " tests[\"Body contains added output_private_key\"] = postman.getEnvironmentVariable(\"output_private_key\") == outputData[i]['parameter value'];", - " break;", - " case \"protocol\":", - " tests[\"Body contains added output_protocol\"] = postman.getEnvironmentVariable(\"output_protocol\") == outputData[i]['parameter value'];", - " break;", - " case \"public_cert\":", - " tests[\"Body contains added output_public_cert\"] = postman.getEnvironmentVariable(\"output_public_cert\") == outputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"tls\":", - " tests[\"Body contains added output_tls\"] = postman.getEnvironmentVariable(\"output_tls\") == outputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added output_type\"] = \"ipv4\" == outputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addoutput ipv6", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_ipv6}};ipv6;4\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get output_key ipv6", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " var i = 0;", - " while (i < outputData.length) {", - " if (postman.getEnvironmentVariable(\"output_name_ipv6\") == outputData[i].name) {", - " postman.setEnvironmentVariable(\"output_ipv6_id\",outputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == outputData.length){", - " tests[\"output_name_ipv6 was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};compression;{{output_compression}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression_buffer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};compression_buffer;{{output_compression_buffer}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression_level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};compression_level;{{output_compression_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput failover", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};failover;{{output_failover}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};retry_interval;{{output_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};category;{{output_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput ca_certificate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};ca_certificate;{{output_ca_certificate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput host", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};host;{{output_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput one_peer_retention_mode", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};one_peer_retention_mode;{{output_one_peer_retention_mode}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};port;{{output_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput private_key", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};private_key;{{output_private_key}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput protocol", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};protocol;{{output_protocol}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput public_cert", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};public_cert;{{output_public_cert}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput tls", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};tls;{{output_tls}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getoutput ipv6", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " for (var i = 0; i < outputData.length; i++) {", - " switch (outputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", - " break;", - " case \"ca_certificate\":", - " tests[\"Body contains added output_ca_certificate\"] = postman.getEnvironmentVariable(\"output_ca_certificate\") == outputData[i]['parameter value'];", - " break;", - " case \"compression\":", - " tests[\"Body contains added output_compression\"] = postman.getEnvironmentVariable(\"output_compression\") == outputData[i]['parameter value'];", - " break;", - " case \"compression_buffer\":", - " tests[\"Body contains added output_compression_buffer\"] = postman.getEnvironmentVariable(\"output_compression_buffer\") == outputData[i]['parameter value'];", - " break;", - " case \"compression_level\":", - " tests[\"Body contains added output_compression_level\"] = postman.getEnvironmentVariable(\"output_compression_level\") == outputData[i]['parameter value'];", - " break;", - " case \"failover\":", - " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", - " break;", - " case \"host\":", - " tests[\"Body contains added output_host\"] = postman.getEnvironmentVariable(\"output_host\") == outputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_ipv6\") == outputData[i]['parameter value'];", - " break;", - " case \"one_peer_retention_mode\":", - " tests[\"Body contains added output_one_peer_retention\"] = postman.getEnvironmentVariable(\"output_one_peer_retention_mode\") == outputData[i]['parameter value'];", - " break;", - " case \"port\":", - " tests[\"Body contains added output_port\"] = postman.getEnvironmentVariable(\"output_port\") == outputData[i]['parameter value'];", - " break;", - " case \"private_key\":", - " tests[\"Body contains added output_private_key\"] = postman.getEnvironmentVariable(\"output_private_key\") == outputData[i]['parameter value'];", - " break;", - " case \"protocol\":", - " tests[\"Body contains added output_protocol\"] = postman.getEnvironmentVariable(\"output_protocol\") == outputData[i]['parameter value'];", - " break;", - " case \"public_cert\":", - " tests[\"Body contains added output_public_cert\"] = postman.getEnvironmentVariable(\"output_public_cert\") == outputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"tls\":", - " tests[\"Body contains added output_tls\"] = postman.getEnvironmentVariable(\"output_tls\") == outputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added output_type\"] = \"ipv6\" == outputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addoutput file", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_file}};file;4\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get output_key file", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " var i = 0;", - " while (i < outputData.length) {", - " if (postman.getEnvironmentVariable(\"output_name_file\") == outputData[i].name) {", - " postman.setEnvironmentVariable(\"output_file_id\",outputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == outputData.length){", - " tests[\"output_name_file was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};category;{{output_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};compression;{{output_compression}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression_buffer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};compression_buffer;{{output_compression_buffer}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression_level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};compression_level;{{output_compression_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput failover", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};failover;{{output_failover}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};retry_interval;{{output_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput protocol", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};protocol;{{output_protocol}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput max_size", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};max_size;{{output_max_size}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};path;{{output_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getoutput file", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " for (var i = 0; i < outputData.length; i++) {", - " switch (outputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", - " break;", - " case \"compression\":", - " tests[\"Body contains added output_compression\"] = postman.getEnvironmentVariable(\"output_compression\") == outputData[i]['parameter value'];", - " break;", - " case \"compression_buffer\":", - " tests[\"Body contains added output_compression_buffer\"] = postman.getEnvironmentVariable(\"output_compression_buffer\") == outputData[i]['parameter value'];", - " break;", - " case \"compression_level\":", - " tests[\"Body contains added output_compression_level\"] = postman.getEnvironmentVariable(\"output_compression_level\") == outputData[i]['parameter value'];", - " break;", - " case \"max_size\":", - " tests[\"Body contains added output_max_size\"] = postman.getEnvironmentVariable(\"output_max_size\") == outputData[i]['parameter value'];", - " break;", - " case \"failover\":", - " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_file\") == outputData[i]['parameter value'];", - " break;", - " case \"path\":", - " tests[\"Body contains added output_path\"] = postman.getEnvironmentVariable(\"output_path\") == outputData[i]['parameter value'];", - " break;", - " case \"protocol\":", - " tests[\"Body contains added output_protocol\"] = postman.getEnvironmentVariable(\"output_protocol\") == outputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added output_type\"] = \"file\" == outputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addoutput rrd", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_rrd}};rrd;4\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get output_key rrd", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " var i = 0;", - " while (i < outputData.length) {", - " if (postman.getEnvironmentVariable(\"output_name_rrd\") == outputData[i].name) {", - " postman.setEnvironmentVariable(\"output_rrd_id\",outputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == outputData.length){", - " tests[\"output_name_rrd was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};category;{{output_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput failover", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};failover;{{output_failover}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};retry_interval;{{output_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};port;{{output_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};path;{{output_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput metrics_path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};metrics_path;{{output_metrics_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput status_path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};status_path;{{output_status_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput write_metrics", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};write_metrics;{{output_write_metrics}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput write_status", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};write_status;{{output_write_status}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getoutput rrd", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " for (var i = 0; i < outputData.length; i++) {", - " switch (outputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", - " break;", - " case \"failover\":", - " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", - " break;", - " case \"metrics_path\":", - " tests[\"Body contains added output_metrics_path\"] = postman.getEnvironmentVariable(\"output_metrics_path\") == outputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_rrd\") == outputData[i]['parameter value'];", - " break;", - " case \"path\":", - " tests[\"Body contains added output_path\"] = postman.getEnvironmentVariable(\"output_path\") == outputData[i]['parameter value'];", - " break;", - " case \"port\":", - " tests[\"Body contains added output_port\"] = postman.getEnvironmentVariable(\"output_port\") == outputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"status_path\":", - " tests[\"Body contains added output_status_path\"] = postman.getEnvironmentVariable(\"output_status_path\") == outputData[i]['parameter value'];", - " break;", - " case \"store_in_data\":", - " tests[\"Body contains added output_store_in_data\"] = postman.getEnvironmentVariable(\"output_store_in_data_bin\") == outputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added output_type\"] = \"rrd\" == outputData[i]['parameter value'];", - " break;", - " case \"write_metrics\":", - " tests[\"Body contains added output_write_metrics\"] = postman.getEnvironmentVariable(\"output_write_status\") == outputData[i]['parameter value'];", - " break;", - " case \"write_status\":", - " tests[\"Body contains added output_write_status\"] = postman.getEnvironmentVariable(\"output_write_status\") == outputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addoutput storage", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_storage}};storage;4\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get output_key storage", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " var i = 0;", - " while (i < outputData.length) {", - " if (postman.getEnvironmentVariable(\"output_name_storage\") == outputData[i].name) {", - " postman.setEnvironmentVariable(\"output_storage_id\",outputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == outputData.length){", - " tests[\"output_name_storage was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};category;{{output_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput failover", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};failover;{{output_failover}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};retry_interval;{{output_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput check_replication", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};check_replication;{{output_check_replication}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput store_in_data_bin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};store_in_data_bin;{{output_store_in_data_bin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_host", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_host;{{output_db_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_name;{{output_db_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_password", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_password;{{output_db_password}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_port;{{output_db_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_type", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_type;{{output_db_type}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_user", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_user;{{output_db_user}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};interval;{{output_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput length", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};length;{{output_length}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput queries_per_transaction", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};queries_per_transaction;{{output_queries_per_transaction}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput read_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};read_timeout;{{output_read_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput rebuild_check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};rebuild_check_interval;{{output_rebuild_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getoutput storage", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " for (var i = 0; i < outputData.length; i++) {", - " switch (outputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", - " break;", - " case \"check_replication\":", - " tests[\"Body contains added output_check_replication\"] = postman.getEnvironmentVariable(\"output_check_replication\") == outputData[i]['parameter value'];", - " break;", - " case \"db_host\":", - " tests[\"Body contains added output_db_host\"] = postman.getEnvironmentVariable(\"output_db_host\") == outputData[i]['parameter value'];", - " break;", - " case \"db_name\":", - " tests[\"Body contains added output_db_name\"] = postman.getEnvironmentVariable(\"output_db_name\") == outputData[i]['parameter value'];", - " break;", - " case \"db_password\":", - " tests[\"Body contains added output_db_password\"] = postman.getEnvironmentVariable(\"output_db_password\") == outputData[i]['parameter value'];", - " break;", - " case \"db_port\":", - " tests[\"Body contains added output_db_port\"] = postman.getEnvironmentVariable(\"output_db_port\") == outputData[i]['parameter value'];", - " break;", - " case \"db_type\":", - " tests[\"Body contains added output_db_type\"] = postman.getEnvironmentVariable(\"output_db_type\") == outputData[i]['parameter value'];", - " break;", - " case \"db_user\":", - " tests[\"Body contains added output_db_user\"] = postman.getEnvironmentVariable(\"output_db_user\") == outputData[i]['parameter value'];", - " break;", - " case \"failover\":", - " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", - " break;", - " case \"interval\":", - " tests[\"Body contains added output_interval\"] = postman.getEnvironmentVariable(\"output_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_storage\") == outputData[i]['parameter value'];", - " break;", - " case \"queries_per_transaction\":", - " tests[\"Body contains added output_queries_per_transaction\"] =postman.getEnvironmentVariable(\"output_queries_per_transaction\") == outputData[i]['parameter value'];", - " break;", - " case \"read_timeout\":", - " tests[\"Body contains added output_read_timeout\"] = postman.getEnvironmentVariable(\"output_read_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"rebuild_check_interval\":", - " tests[\"Body contains added output_rebuild_check_interval\"] = postman.getEnvironmentVariable(\"output_rebuild_check_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"store_in_data_bin\":", - " tests[\"Body contains added output_store_in_data_bin\"] = postman.getEnvironmentVariable(\"output_store_in_data_bin\") == outputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added output_type\"] = \"storage\" == outputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addoutput sql", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_sql}};sql;4\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get output_key sql", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " var i = 0;", - " while (i < outputData.length) {", - " if (postman.getEnvironmentVariable(\"output_name_sql\") == outputData[i].name) {", - " postman.setEnvironmentVariable(\"output_sql_id\",outputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == outputData.length){", - " tests[\"output_name_sql was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};category;{{output_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput failover", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};failover;{{output_failover}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};retry_interval;{{output_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput check_replication", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};check_replication;{{output_check_replication}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput cleanup_check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};cleanup_check_interval;{{output_cleanup_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_host", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_host;{{output_db_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_name;{{output_db_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_password", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_password;{{output_db_password}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_port;{{output_db_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_type", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_type;{{output_db_type}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_user", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_user;{{output_db_user}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput instance_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};instance_timeout;{{output_instance_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput queries_per_transaction", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};queries_per_transaction;{{output_queries_per_transaction}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput read_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};read_timeout;{{output_read_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getoutput sql", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " for (var i = 0; i < outputData.length; i++) {", - " switch (outputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", - " break;", - " case \"check_replication\":", - " tests[\"Body contains added output_check_replication\"] = postman.getEnvironmentVariable(\"output_check_replication\") == outputData[i]['parameter value'];", - " break;", - " case \"cleanup_check_interval\":", - " tests[\"Body contains added output_cleanup_check_interval\"] = postman.getEnvironmentVariable(\"output_cleanup_check_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"db_host\":", - " tests[\"Body contains added output_db_host\"] = postman.getEnvironmentVariable(\"output_db_host\") == outputData[i]['parameter value'];", - " break;", - " case \"db_name\":", - " tests[\"Body contains added output_db_name\"] = postman.getEnvironmentVariable(\"output_db_name\") == outputData[i]['parameter value'];", - " break;", - " case \"db_password\":", - " tests[\"Body contains added output_db_password\"] = postman.getEnvironmentVariable(\"output_db_password\") == outputData[i]['parameter value'];", - " break;", - " case \"db_port\":", - " tests[\"Body contains added output_db_port\"] = postman.getEnvironmentVariable(\"output_db_port\") == outputData[i]['parameter value'];", - " break;", - " case \"db_type\":", - " tests[\"Body contains added output_db_type\"] = postman.getEnvironmentVariable(\"output_db_type\") == outputData[i]['parameter value'];", - " break;", - " case \"db_user\":", - " tests[\"Body contains added output_db_user\"] = postman.getEnvironmentVariable(\"output_db_user\") == outputData[i]['parameter value'];", - " break;", - " case \"failover\":", - " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", - " break;", - " case \"instance_timeout\":", - " tests[\"Body contains added output_instance_timeout\"] = postman.getEnvironmentVariable(\"output_instance_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_sql\") == outputData[i]['parameter value'];", - " break;", - " case \"queries_per_transaction\":", - " tests[\"Body contains added output_queries_per_transaction\"] =postman.getEnvironmentVariable(\"output_queries_per_transaction\") == outputData[i]['parameter value'];", - " break;", - " case \"read_timeout\":", - " tests[\"Body contains added output_read_timeout\"] = postman.getEnvironmentVariable(\"output_read_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added output_type\"] = \"sql\" == outputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gettypelist", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"gettypelist\",\n \"object\": \"centbrokercfg\",\n \"values\": \"output\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getfieldlist", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getfieldlist\",\n \"object\": \"centbrokercfg\",\n \"values\": \"ipv4\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "10-Timeperiods", - "description": "", - "item": [ - { - "name": "Add tp", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"tp\",\n \"values\": \"test_name;test_alias\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"test_name;name;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};alias;{{tp_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam sunday", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam monday", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam tuesday", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam wednesday", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam thursday", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam friday", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam include", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};include;{{tp_include}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam exclude", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};exclude;{{tp_exclude}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List timeperiod", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var tpData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of time periods\"] = tpData;", - " var i = 0;", - " while (i < tpData.length) {", - " if (postman.getEnvironmentVariable(\"tp_name\") == tpData[i].name) {", - " tests[\"Body contains added name\"] = postman.getEnvironmentVariable(\"tp_name\") == tpData[i].name;", - " tests[\"Body contains added alias\"] = postman.getEnvironmentVariable(\"tp_alias\") == tpData[i].alias;", - " tests[\"Body contains added sunday\"] = postman.getEnvironmentVariable(\"tp_sunday\") == tpData[i].sunday;", - " tests[\"Body contains added monday\"] = postman.getEnvironmentVariable(\"tp_monday\") == tpData[i].monday;", - " tests[\"Body contains added tuesday\"] = postman.getEnvironmentVariable(\"tp_tuesday\") == tpData[i].tuesday;", - " tests[\"Body contains added wednesday\"] = postman.getEnvironmentVariable(\"tp_wednesday\") == tpData[i].wednesday;", - " tests[\"Body contains added thursday\"] = postman.getEnvironmentVariable(\"tp_thursday\") == tpData[i].thursday;", - " tests[\"Body contains added friday\"] = postman.getEnvironmentVariable(\"tp_friday\") == tpData[i].friday;", - " tests[\"Body contains added saturday\"] = postman.getEnvironmentVariable(\"tp_saturday\") == tpData[i].saturday;", - " break;", - " }", - " i++;", - " }", - " if (i == tpData.length)", - " tests[\"tp_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"tp\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Set exception", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setexception\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}};{{exception_day}};{{exception_timerange}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get exceptions", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var exceptionData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of exceptions\"] = exceptionData;", - " var i = 0;", - " while (i < exceptionData.length) {", - " if (postman.getEnvironmentVariable(\"exception_day\") == exceptionData[i].days) {", - " tests[\"Body contains added exception day\"] = postman.getEnvironmentVariable(\"exception_day\") == exceptionData[i].days;", - " tests[\"Body contains added exception timerange\"] = postman.getEnvironmentVariable(\"exception_timerange\") == exceptionData[i].timerange;", - " break;", - " }", - " i++;", - " }", - " if (i == tpData.length)", - " tests[\"tp_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getexception\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del exception", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delexception\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}};{{exception_day}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "11-Commands", - "description": "Tests all commands to manage commands.", - "item": [ - { - "name": "Add 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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"cmd\",\n \"values\": \"cmd-test;misc;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"cmd-test;name;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam line", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};line;{{command_line}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam type", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};type;{{command_type}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam graph", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};graph;{{command_graph}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam example", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};example;{{command_example}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};comment;{{command_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List commands", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var commandData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of commands\"] = commandData;", - " var i = 0;", - " while (i < commandData.length) {", - " if (postman.getEnvironmentVariable(\"command_name\") == commandData[i].name) {", - " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == commandData[i].name;", - " tests[\"Body contains added command_type\"] = postman.getEnvironmentVariable(\"command_type\") == commandData[i].type;", - " tests[\"Body contains added command_line\"] = postman.getEnvironmentVariable(\"command_line\") == commandData[i].line;", - " break;", - " }", - " i++;", - " }", - " if (i == commandData.length)", - " tests[\"command_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"cmd\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "20-Contacts templates", - "description": "Tests all commands to manage contact.", - "item": [ - { - "name": "Add ctpl", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"contacttpl\",\n \"values\": \"test_name;test_alias;test@localhost;pwd;0;0;en_US;Idap\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"test_alias;name;{{ctpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"test_alias;alias;{{ctpl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};comment;{{ctpl_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam hostnotifcmd", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};hostnotifcmd;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam svcnotifcmd", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};svcnotifcmd;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam hostnotifperiod", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};hostnotifperiod;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam svcnotifperiod", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};svcnotifperiod;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam hostnotifopt", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};hostnotifopt;{{contact_hostnotifopt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam svcnotifopt", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};servicenotifopt;{{contact_svcnotifopt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address1", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address1;{{contact_address1}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address2;{{contact_address2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address3", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address3;{{contact_address3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address4", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address4;{{contact_address4}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address5", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address5;{{contact_address5}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address6", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address6;{{contact_address6}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create ctpl2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_name2}};{{ctpl_alias2}};test@localhost;pwd;0;0;en_US;Idap\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam template", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};template;{{ctpl_alias2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Enable", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"enable\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Disable", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"disable\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "21-Contacts", - "description": "Tests all commands to manage contact.", - "item": [ - { - "name": "Add contact", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"contact\",\n \"values\": \"test_name;test_alias;test@localhost;pwd;0;0;en_US;Idap\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"test_alias;name;{{contact_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"test_alias;alias;{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};comment;{{contact_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam mail", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};email;{{contact_mail}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam password", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};password;{{contact_pwd}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};access;{{contact_access}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam language", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};language;{{contact_language}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam GUI access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};access;{{contact_GUI_access}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam admin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;{{contact_admin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam authtype", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};authtype;{{contact_authentication}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam hostnotifcmd", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifcmd;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam svcnotifcmd", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifcmd;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam hostnotifperiod", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifperiod;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam svcnotifperiod", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifperiod;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam hostnotifopt", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam svcnotifopt", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam address1", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address1;{{contact_address1}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address2;{{contact_address2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address3", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address3;{{contact_address3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address4", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address4;{{contact_address4}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address5", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address5;{{contact_address5}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address6", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address6;{{contact_address6}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_dn", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};ldap_dn;{{contact_ldap_dn}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam autologin_key", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};autologin_key;{{contact_autologin_key}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam template", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};template;{{ctpl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"enable\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Disable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"disable\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List contact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_name\") == contactData[i].name) {", - " tests[\"Body contains added contact_name\"] = postman.getEnvironmentVariable(\"contact_name\") == contactData[i].name;", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].alias;", - " tests[\"Body contains added contact_email\"] = postman.getEnvironmentVariable(\"contact_mail\") == contactData[i].email;", - " tests[\"Body contains added contact_GUI_access\"] = postman.getEnvironmentVariable(\"contact_GUI_access\") == contactData[i]['gui access'];", - " tests[\"Body contains added contact_admin\"] = postman.getEnvironmentVariable(\"contact_admin\") == contactData[i].admin;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"contact\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Set contact non admin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;0\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create contact-2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"contact\",\n \"values\": \"{{contact_name2}};{{contact_alias2}};test@localhost;pwd;0;0;en_US;Idap\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Set contact non admin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;0\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "22-Contactgroups", - "description": "Tests all commands to manage contact groups.", - "item": [ - { - "name": "Add contact group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"cg\",\n \"values\": \"test_name;test_alias\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cg\",\n \"values\": \"test_name;name;{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};alias;{{cg_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"enable\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Disable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"disable\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", - " {", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_alias was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;", - "" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List contact group", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name)", - " {", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " tests[\"Body contains added cg_alias\"] = postman.getEnvironmentVariable(\"cg_alias\") == cgData[i].alias;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"cg\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "30-Hosts_Templates", - "description": "", - "item": [ - { - "name": "Create host template2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name2}};{{htpl_name2}};0.0.0.0;;central;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add htpl", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"test_host;test_host;0.0.0.0;{{htpl_name2}};central;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"test_host;name;{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam 2d_coords", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};2d_coords;{{host_2d_coords}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam 3d_coords", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};3d_coords;{{host_3d_coords}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam action_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};action_url;{{host_action_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};activate;{{host_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam active_checks_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};active_checks_enabled;{{host_active_checks_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};address;{{host_address}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};alias;{{host_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List hosts", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hostData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of hosts\"] = hostData;", - " var i = 0;", - " while (i < hostData.length) {", - " if (postman.getEnvironmentVariable(\"htpl_name\") == hostData[i].name) {", - " tests[\"Body contains added host\"] = postman.getEnvironmentVariable(\"htpl_name\") == hostData[i].name;", - " tests[\"Body contains added host_alias\"] = postman.getEnvironmentVariable(\"host_alias\") == hostData[i].alias;", - " tests[\"Body contains added host_address\"] = postman.getEnvironmentVariable(\"host_address\") == hostData[i].address;", - " tests[\"Body contains added host_activate\"] = postman.getEnvironmentVariable(\"host_activate\") == hostData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == hostData.length)", - " tests[\"htpl_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"show\",\n \"object\":\"htpl\"\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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_command;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_command_arguments", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_command_arguments;{{command_example}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_interval;{{host_normal_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_freshness", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_freshness;{{host_check_freshness}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_period;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};checks_enabled;{{host_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam contact_additive_inheritance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};contact_additive_inheritance;{{host_contact_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam cg_additive_inheritance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};cg_additive_inheritance;{{host_cg_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};event_handler;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_arg", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};event_handler_arguments;{{command_example}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};event_handler_enabled;{{host_event_handler_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam first_notification_delay", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};first_notification_delay;{{host_first_notif_delay}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam flap_detection_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};flap_detection_enabled;{{host_flap_detect_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam host_low_flap_threshold", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};host_low_flap_threshold;{{host_low_flap}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam host_high_flap_threshold", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};host_high_flap_threshold;{{host_high_flap}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam flap_detection_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};flap_detection_options;{{host_flap_detect_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};icon_image;{{host_icon_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image_alt", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};icon_image_alt;{{host_icon_image_alt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam max_check_attempts", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam notes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notes;{{host_notes}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notes_url;{{host_notes_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notifications_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notifications_enabled;{{host_notif_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notification_interval;{{host_notif_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notification_options;{{host_notif_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notification_period;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam recovery_notif_delay", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};recovery_notification_delay;{{host_recovery_notif_delay}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam obsess_over_host", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};obsess_over_host;{{host_obsess_over_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam passive_checks_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};passive_checks_enabled;{{host_passive_checks_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam process_perf_data", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};process_perf_data;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_status_info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};retain_status_information;{{host_retain_status_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_nonstatus_info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};retain_nonstatus_information;{{host_retain_nonstatus_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retry_check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};retry_check_interval;{{host_retry_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam snmp_community", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam snmp_version", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": "Setparam stalking_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};stalking_options;{{host_stalking_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam statusmap_image", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};statusmap_image;{{host_statusmap_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam host_notif_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};host_notification_options;{{host_notification_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam timezone", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};timezone;{{host_timezone}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmacro", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setmacro\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{host_macro_name}};{{host_macro_value}};{{host_is_password}};{{host_macro_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmacro", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var macroData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of macros\"] = macroData;", - " var i = 0;", - " while (i < macroData.length) {", - " if (postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name']) {", - " tests[\"Body contains added macro\"] = postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name'];", - " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"host_macro_value\") == macroData[i]['macro value'];", - " tests[\"Body contains added macro_is_password\"] = postman.getEnvironmentVariable(\"host_is_password\") == macroData[i].is_password;", - " tests[\"Body contains added macro_description\"] = postman.getEnvironmentVariable(\"host_macro_description\") == macroData[i].description;", - " break;", - " }", - " i++;", - " }", - " if (i == macroData.length)", - " tests[\"host_macro_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getmacro\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmacro", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"delmacro\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{host_macro_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create host template3", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name3}};test_host;0.0.0.0;;central;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addtemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"addtemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deltemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"deltemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Settemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"settemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gettemplate", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var templateData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of templates\"] = templateData;", - " var i = 0;", - " while (i < templateData.length) {", - " if (postman.getEnvironmentVariable(\"htpl_name3\") == templateData[i].name) {", - " tests[\"Body contains added htpl_name3\"] = postman.getEnvironmentVariable(\"htpl_name3\") == templateData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == templateData.length)", - " tests[\"htpl_name3 was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"gettemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addparent\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delparent\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparent\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getparent", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var parentData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of parents\"] = parentData;", - " var i = 0;", - " while (i < parentData.length) {", - " if (postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name) {", - " tests[\"Body contains added host_name2\"] = postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == parentData.length)", - " tests[\"host_name2 was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getparent\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontactgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getcontactgroup\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_alias was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getcontact\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add host group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"test_name;test_alias\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"test_name;name;{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gethostgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = hgData;", - " var i = 0;", - " while (i < hgData.length) {", - " if (postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name) {", - " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == hgData.length)", - " tests[\"hg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"gethostgroup\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add host category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Set hc 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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setseverity", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Unsetseverity", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"enable\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Disable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"disable\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "31-Hosts", - "description": "Tests all commands to manage hosts", - "item": [ - { - "name": "Add host", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"test_host;test_host;0.0.0.0;{{htpl_name}};central;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"test_host;name;{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam 2d_coords", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};2d_coords;{{host_2d_coords}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam 3d_coords", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};3d_coords;{{host_3d_coords}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam action_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};action_url;{{host_action_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};activate;{{host_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam active_checks_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};active_checks_enabled;{{host_active_checks_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};address;{{host_address}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};alias;{{host_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List hosts", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hostData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of hosts\"] = hostData;", - " var i = 0;", - " while (i < hostData.length) {", - " if (postman.getEnvironmentVariable(\"host_name\") == hostData[i].name) {", - " tests[\"Body contains added host\"] = postman.getEnvironmentVariable(\"host_name\") == hostData[i].name;", - " tests[\"Body contains added host_alias\"] = postman.getEnvironmentVariable(\"host_alias\") == hostData[i].alias;", - " tests[\"Body contains added host_address\"] = postman.getEnvironmentVariable(\"host_address\") == hostData[i].address;", - " tests[\"Body contains added host_activate\"] = postman.getEnvironmentVariable(\"host_activate\") == hostData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == hostData.length)", - " tests[\"host_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"show\",\n \"object\":\"host\"\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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_command;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_command_arguments", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_command_arguments;{{command_example}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_interval;{{host_normal_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_freshness", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_freshness;{{host_check_freshness}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_period;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};checks_enabled;{{host_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam contact_additive_inheritance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};contact_additive_inheritance;{{host_contact_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam cg_additive_inheritance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};cg_additive_inheritance;{{host_cg_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};event_handler;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_arg", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};event_handler_arguments;{{command_example}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};event_handler_enabled;{{host_event_handler_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam first_notification_delay", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};first_notification_delay;{{host_first_notif_delay}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam flap_detection_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};flap_detection_enabled;{{host_flap_detect_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam host_low_flap_threshold", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};host_low_flap_threshold;{{host_low_flap}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam host_high_flap_threshold", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};host_high_flap_threshold;{{host_high_flap}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam flap_detection_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};flap_detection_options;{{host_flap_detect_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};icon_image;{{host_icon_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image_alt", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};icon_image_alt;{{host_icon_image_alt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam max_check_attempts", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};max_check_attempts;{{host_max_check_attempts}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notes;{{host_notes}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notes_url;{{host_notes_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notifications_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notifications_enabled;{{host_notif_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notification_interval;{{host_notif_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notification_options;{{host_notif_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notification_period;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam recovery_notif_delay", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};recovery_notification_delay;{{host_recovery_notif_delay}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam obsess_over_host", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};obsess_over_host;{{host_obsess_over_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam passive_checks_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};passive_checks_enabled;{{host_passive_checks_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam process_perf_data", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};process_perf_data;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_status_info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};retain_status_information;{{host_retain_status_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_nonstatus_info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};retain_nonstatus_information;{{host_retain_nonstatus_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retry_check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};retry_check_interval;{{host_retry_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam snmp_community", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};snmp_community;{{host_snmp_community}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam snmp_version", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};snmp_version;{{host_snmp_version}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam stalking_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};stalking_options;{{host_stalking_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam statusmap_image", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};statusmap_image;{{host_statusmap_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam host_notif_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};host_notification_options;{{host_notification_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam timezone", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};timezone;{{host_timezone}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinstance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setinstance\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmacro", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setmacro\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{host_macro_name}};{{host_macro_value}};{{host_is_password}};{{host_macro_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmacro", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var macroData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of macros\"] = macroData;", - " var i = 0;", - " while (i < macroData.length) {", - " if (postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name']) {", - " tests[\"Body contains added macro\"] = postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name'];", - " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"host_macro_value\") == macroData[i]['macro value'];", - " tests[\"Body contains added macro_is_password\"] = postman.getEnvironmentVariable(\"host_is_password\") == macroData[i].is_password;", - " tests[\"Body contains added macro_description\"] = postman.getEnvironmentVariable(\"host_macro_description\") == macroData[i].description;", - " break;", - " }", - " i++;", - " }", - " if (i == macroData.length)", - " tests[\"host_macro_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getmacro\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmacro", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"delmacro\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{host_macro_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addtemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"addtemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deltemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"deltemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Settemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"settemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gettemplate", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var templateData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of templates\"] = templateData;", - " var i = 0;", - " while (i < templateData.length) {", - " if (postman.getEnvironmentVariable(\"htpl_name\") == templateData[i].name) {", - " tests[\"Body contains added htpl_name\"] = postman.getEnvironmentVariable(\"htpl_name\") == templateData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == templateData.length)", - " tests[\"host_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"gettemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Applytpl", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"applytpl\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addparent\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delparent\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparent\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getparent", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var parentData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of parents\"] = parentData;", - " var i = 0;", - " while (i < parentData.length) {", - " if (postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name) {", - " tests[\"Body contains added parent\"] = postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == parentData.length)", - " tests[\"host_name2 was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getparent\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontactgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getcontactgroup\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_alias was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getcontact\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gethostgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = hgData;", - " var i = 0;", - " while (i < hgData.length) {", - " if (postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name) {", - " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == hgData.length)", - " tests[\"hg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"gethostgroup\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setseverity", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Unsetseverity", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"enable\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Disable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"disable\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "32-Hostgroups", - "description": "Tests all commands to manage host groups.", - "item": [ - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};alias;{{hg_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};comment;{{hg_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};activate;{{hg_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};notes;{{hg_notes}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};notes_url;{{hg_notes_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam action_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};action_url;{{hg_action_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};icon_image;{{hg_icon_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam map_icon_image", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};map_icon_image;{{hg_map_icon_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List host groups", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of host categories\"] = hgData;", - " var i = 0;", - " while (i < hgData.length) {", - " if (postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name)", - " {", - " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name;", - " tests[\"Body contains added hg_alias\"] = postman.getEnvironmentVariable(\"hg_alias\") == hgData[i].alias;", - " break;", - " }", - " i++;", - " }", - " if (i == hgData.length)", - " tests[\"hg_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"hg\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addmember", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmenber", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmember", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmember", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hg_member_Data = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of host group members\"] = hg_member_Data;", - " var i = 0;", - " while (i < hg_member_Data.length) {", - " if (postman.getEnvironmentVariable(\"host_name\") == hg_member_Data[i].name)", - " {", - " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == hg_member_Data[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == hg_member_Data.length)", - " tests[\"host_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "33-Hosts_Categories", - "description": "Tests all commands to manage host categories.", - "item": [ - { - "name": "Addmember", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmember", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmember", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{host_name}}|{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmember", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hc_member_Data = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of host category members\"] = hc_member_Data;", - " var i = 0;", - " while (i < hc_member_Data.length) {", - " if (postman.getEnvironmentVariable(\"host_name\") == hc_member_Data[i].name)", - " {", - " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == hc_member_Data[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == hc_member_Data.length)", - " {", - " tests[\"host_name was found\"] = false;", - " }", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Unsetseverity", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List host categories", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hcData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of host categories\"] = hcData;", - " var i = 0;", - " while (i < hcData.length) {", - " if (postman.getEnvironmentVariable(\"hc_name\") == hcData[i].name)", - " {", - " tests[\"Body contains added hc_name\"] = postman.getEnvironmentVariable(\"hc_name\") == hcData[i].name;", - " tests[\"Body contains added hc_alias\"] = postman.getEnvironmentVariable(\"hc_alias\") == hcData[i].alias;", - " break;", - " }", - " i++;", - " }", - " if (i == hcData.length)", - " tests[\"hc_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"hc\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "40-Services_Templates", - "description": "Tests all commands to manage service templates.", - "item": [ - { - "name": "Add service template", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"stpl\",\n \"values\": \"test_stpl;stpl_alias;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam description", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"test_stpl;description;{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};activate;{{stpl_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};alias;{{stpl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create service template-2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description2}};test_alias;{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam template", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};template;{{stpl_description2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam is_volatile", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};is_volatile;{{stpl_is_volatile}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_command;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_command_arguments", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_command_arguments;{{command_argument}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam max_check_attempts", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam normal_check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};normal_check_interval;{{stpl_normal_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retry_check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};retry_check_interval;{{stpl_retry_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam active_checks_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};active_checks_enabled;{{stpl_active_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam passive_checks_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};passive_checks_enabled;{{stpl_passive_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam contact_additive_inheritance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};contact_additive_inheritance;{{stpl_contact_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam cg_additive_inheritance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};cg_additive_inheritance;{{stpl_cg_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notification_interval;{{stpl_notification_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notification_period;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notification_options;{{stpl_notif_option}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam first_notification_delay", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};first_notification_delay;{{stpl_first_notif_delay}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam parallelize_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};parallelize_check;{{stpl_parallelize_checks}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam obsess_over_service", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};obsess_over_service;{{stpl_obsess_over_service}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_freshness", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_freshness;{{stpl_check_freshness}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam freshness_threshold", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};freshness_threshold;{{stpl_freshness_threshold}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};event_handler_enabled;{{stpl_event_handler_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam flap_detection_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};flap_detection_enabled;{{stpl_flap_detection_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam process_perf_data", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};process_perf_data;{{stpl_process_perf_data}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_status_informations", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};retain_status_information;{{stpl_retain_status_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_nonstatus_informations", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};retain_nonstatus_information;{{stpl_retain_nonstatus_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam stalking_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};stalking_options;{{stpl_stalking_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};event_handler;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_arguments", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};event_handler_arguments;{{stpl_event_handler_arg}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notes;{{stpl_notes}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notes_url;{{stpl_notes_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam action_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};action_url;{{stpl_action_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};icon_image;{{stpl_icon_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image_alt", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};icon_image_alt;{{stpl_icon_image_alt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam graphtemplate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};graphtemplate;{{stpl_graph_tpl}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};comment;{{stpl_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam service_notif_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};service_notification_options;{{stpl_notif_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List service templates", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var stplData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of service templates\"] = stplData;", - " var i = 0;", - " while (i < stplData.length) {", - " if (postman.getEnvironmentVariable(\"stpl_description\") == stplData[i].description)", - " {", - " tests[\"Body contains added service template\"] = postman.getEnvironmentVariable(\"stpl_description\") == stplData[i].description;", - " tests[\"Body contains added alias\"] = postman.getEnvironmentVariable(\"stpl_alias\") == stplData[i].alias;", - " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == stplData[i]['check command'];", - " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == stplData[i]['check command arg'];", - " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"stpl_normal_check_interval\") == stplData[i]['normal check interval'];", - " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"stpl_retry_check_interval\") == stplData[i]['retry check interval'];", - " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"stpl_max_check\") == stplData[i]['max check attempts'];", - " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"stpl_active_check_enabled\") == stplData[i]['active checks enabled'];", - " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"stpl_passive_check_enabled\") == stplData[i]['passive checks enabled'];", - " break;", - " }", - " i++;", - " }", - " if (i == stplData.length)", - " tests[\"stpl_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"stpl\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhosttemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhosttemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethosttemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}|{{htpl_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmacro", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{stpl_macro_name}};{{stpl_macro_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmacro", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var macroData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of macros\"] = macroData;", - " var i = 0;", - " while (i < macroData.length) {", - " if (postman.getEnvironmentVariable(\"stpl_macro_value\") == macroData[i]['macro value']){", - " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"stpl_macro_value\") == macroData[i]['macro value'];", - " break;", - " }", - " i++;", - " }", - " if (i == macroData.length)", - " tests[\"stpl_macro_value was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmacro", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delmacro\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{stpl_macro_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}|{{contact_alias2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name){", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_alias was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontactgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name){", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add trap", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"trap\",\n \"values\": \"test_name;test_OID\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"test_name;name;{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Settrap", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"settrap\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gettrap", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var trapData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of traps\"] = trapData;", - " var i = 0;", - " while (i < trapData.length) {", - " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name){", - " tests[\"Body contains added trap_name\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == trapData.length)", - " tests[\"trap_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"gettrap\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deltrap", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deltrap\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "41-Services", - "description": "Tests all commands to manage services.", - "item": [ - { - "name": "Add service", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};service_test;{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam description", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};service_test;description;{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};activate;{{service_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam template", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};template;{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam is_volatile", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};is_volatile;{{service_is_volatile}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};check_command;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_command_arguments", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};check_command_arguments;{{command_argument}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam max_check_attempts", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};max_check_attempts;{{service_max_check_attempts}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam normal_check_interval", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};normal_check_interval;{{service_normal_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retry_check_interval", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};retry_check_interval;{{service_retry_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam active_checks_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};active_checks_enabled;{{service_active_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam passive_checks_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};passive_checks_enabled;{{service_passive_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam contact_additive_inheritance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};contact_additive_inheritance;{{service_contact_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam cg_additive_inheritance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};cg_additive_inheritance;{{service_cg_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notifications_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notifications_enabled;{{service_notifications_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam contact_additive_inheritance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};contact_additive_inheritance;{{service_contact_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam cg_additive_inheritance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};cg_additive_inheritance;{{service_cg_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_interval", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notification_interval;{{service_notif_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notification_period;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_options", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notification_options;{{service_notif_option}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam first_notification_delay", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};first_notification_delay;{{service_first_notif_delay}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam parallelize_check", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};parallelize_check;{{service_parallelize_checks}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam obsess_over_service", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};obsess_over_service;{{service_obsess_over_service}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_freshness", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};check_freshness;{{service_check_freshness}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam freshness_threshold", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};freshness_threshold;{{service_freshness_threshold}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};event_handler_enabled;{{service_event_handler_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam flap_detection_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};flap_detection_enabled;{{service_flap_detection_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam service_low_flap_threshold", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};service_low_flap_threshold;{{service_low_flap}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam service_high_flap_threshold", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};service_high_flap_threshold;{{service_high_flap}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam process_perf_data", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};process_perf_data;{{service_process_perf_data}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_status_informations", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};retain_status_information;{{service_retain_status_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_nonstatus_informations", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};retain_nonstatus_information;{{service_retain_nonstatus_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};event_handler;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_arguments", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};event_handler_arguments;{{service_event_handler_arg}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notes;{{service_notes}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes_url", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notes_url;{{service_notes_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam action_url", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};action_url;{{service_action_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};icon_image;{{service_icon_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image_alt", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};icon_image_alt;{{service_icon_image_alt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};comment;{{service_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam service_notif_options", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};service_notification_options;{{service_notif_option}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List service", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serviceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of services\"] = serviceData;", - " var i = 0;", - " while (i < serviceData.length) {", - " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i].description)", - " {", - " tests[\"Body contains added service\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i].description;", - " tests[\"Body contains added host name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", - " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == serviceData[i]['check command'];", - " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == serviceData[i]['check command arg'];", - " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"service_normal_check_interval\") == serviceData[i]['normal check interval'];", - " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"service_retry_check_interval\") == serviceData[i]['retry check interval'];", - " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"service_max_check_attempts\") == serviceData[i]['max check attempts'];", - " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"service_active_check_enabled\") == serviceData[i]['active checks enabled'];", - " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"service_passive_check_enabled\") == serviceData[i]['passive checks enabled'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"service_host was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"service\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhost", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhost\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhost", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhost\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethost-2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethost\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethost", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethost\",\n \"object\": \"service\",\n \"values\": \"{{host_name2}};{{service_description}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmacro", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{service_macro_name}};{{service_macro_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmacro", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var macroData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of macros\"] = macroData;", - " var i = 0;", - " while (i < macroData.length) {", - " if (postman.getEnvironmentVariable(\"service_macro_name\") == macroData[i]['macro name'])", - " {", - " tests[\"Body contains added macro_name\"] = postman.getEnvironmentVariable(\"service_macro_name\") == macroData[i]['macro name'];", - " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"service_macro_value\") == macroData[i]['macro value'];", - " break;", - " }", - " i++;", - " }", - " if (i == macroData.length)", - " tests[\"service_macro_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmacro", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delmacro\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{service_macro_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add service categories", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"sc\",\n \"values\": \"sc_test;description_test\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sc\",\n \"values\": \"sc_test;name;{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setseverity", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Unsetseverity", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Resetseverity", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setseverity", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Unsetseverity", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of conctacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", - " {", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_alias was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontactgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of conctact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name){", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addtrap", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addtrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deltrap", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deltrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Settrap", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"settrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gettrap", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var trapData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of traps\"] = trapData;", - " var i = 0;", - " while (i < trapData.length) {", - " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name)", - " {", - " tests[\"Body contains added trap_name\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == trapData.length)", - " tests[\"trap_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"gettrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "42-Service_by_Hostgroups", - "description": "Tests all commands to manage services on host group.", - "item": [ - { - "name": "Add hgservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};hgservice_test;{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam description", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};hgservice_test;description;{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};activate;{{hgservice_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam template", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};template;{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam is_volatile", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};is_volatile;{{hgservice_is_volatile}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_command;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_command_arguments", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_command_arguments;{{command_argument}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam max_check_attempts", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};max_check_attempts;{{hgservice_max_check_attempts}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam normal_check_interval", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};normal_check_interval;{{hgservice_normal_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retry_check_interval", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retry_check_interval;{{hgservice_retry_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam active_checks_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};active_checks_enabled;{{hgservice_active_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam passive_checks_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};passive_checks_enabled;{{hgservice_passive_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam contact_additive_inheritance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};contact_additive_inheritance;{{hgservice_contact_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam cg_additive_inheritance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};cg_additive_inheritance;{{hgservice_cg_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notifications_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notifications_enabled;{{hgservice_notifications_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_interval", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_interval;{{hgservice_notif_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_period;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_options", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_options;{{hgservice_notif_option}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam first_notification_delay", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};first_notification_delay;{{hgservice_first_notif_delay}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam parallelize_check", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};parallelize_check;{{hgservice_parallelize_checks}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam obsess_over_service", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};obsess_over_service;{{hgservice_obsess_over_service}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_freshness", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_freshness;{{hgservice_check_freshness}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam freshness_threshold", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};freshness_threshold;{{hgservice_freshness_threshold}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_enabled;{{hgservice_event_handler_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam flap_detection_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};flap_detection_enabled;{{hgservice_flap_detection_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam process_perf_data", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};process_perf_data;{{hgservice_process_perf_data}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_status_informations", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_status_information;{{hgservice_retain_status_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_nonstatus_informations", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_nonstatus_information;{{hgservice_retain_nonstatus_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_arguments", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_arguments;{{hgservice_event_handler_arg}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes;{{hgservice_notes}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes_url", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes_url;{{hgservice_notes_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam action_url", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};action_url;{{hgservice_action_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image;{{hgservice_icon_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image_alt", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image_alt;{{hgservice_icon_image_alt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};comment;{{hgservice_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam service_notif_options", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};service_notification_options;{{hg_notif_option}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List service", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serviceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of host group services\"] = serviceData;", - " var i = 0;", - " while (i < serviceData.length) {", - " if (postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description)", - " {", - " tests[\"Body contains added hgservice\"] = postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description;", - " tests[\"Body contains added hgservice_hg\"] = postman.getEnvironmentVariable(\"hg_name\") == serviceData[i]['hg name'];", - " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == serviceData[i]['check command'];", - " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == serviceData[i]['check command arg'];", - " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"hgservice_normal_check_interval\") == serviceData[i]['normal check interval'];", - " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"hgservice_retry_check_interval\") == serviceData[i]['retry check interval'];", - " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"hgservice_max_check_attempts\") == serviceData[i]['max check attempts'];", - " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_active_check_enabled\") == serviceData[i]['active checks enabled'];", - " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_passive_check_enabled\") == serviceData[i]['passive checks enabled'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"hgservice_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"hgservice\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create hg-2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name2}};{{hg_name2}};0.0.0.0;;central;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethostgroup-2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name2}};{{hgservice_description}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmacro", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hgservice_macro_name}};{{hgservice_macro_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmacro", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var macroData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of macros\"] = macroData;", - " var i = 0;", - " var macro_name = \"$_SERVICE\" + postman.getEnvironmentVariable(\"hgservice_macro_name\") + \"$\";", - " while (i < macroData.length) {", - " if (macro_name == macroData[i]['macro name'])", - " {", - " tests[\"Body contains added macro_name\"] = macro_name == macroData[i]['macro name'];", - " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"hgservice_macro_value\") == macroData[i]['macro value'];", - " break;", - " }", - " i++;", - " }", - " if (i == macroData.length)", - " tests[\"hgservice_macro_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmacro", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hgservice_macro_name}};{{hgservice_macro_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of conctacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", - " {", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_alias was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setseverity", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Unsetseverity", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontactgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name)", - " {", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "43-Servicegroups", - "description": "Tests all commands to manage service groups.", - "item": [ - { - "name": "Add service group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"sg\",\n \"values\": \"sg_test;alias_test\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"sg_test;name;{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};activate;{{sg_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};alias;{{sg_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};comment;{{sg_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List service group", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var sgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of service groups\"] = sgData;", - " var i = 0;", - " while (i < sgData.length) {", - " if (postman.getEnvironmentVariable(\"sg_name\") == sgData[i].name)", - " {", - " tests[\"Body contains added service group\"] = postman.getEnvironmentVariable(\"sg_name\") == sgData[i].name;", - " tests[\"Body contains added service alias\"] = postman.getEnvironmentVariable(\"sg_alias\") == sgData[i].alias;", - " break;", - " }", - " i++;", - " }", - " if (i == sgData.length)", - " tests[\"sg_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"sg\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getservice", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serviceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of services\"] = serviceData;", - " var i = 0;", - " while (i < serviceData.length) {", - " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'])", - " {", - " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", - " tests[\"Body contains added service\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"service_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhostgroupservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhostgroupservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethostgroupservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gethostgroupservice", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hgserviceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of host group services\"] = hgserviceData;", - " var i = 0;", - " while (i < hgserviceData.length) {", - " if (postman.getEnvironmentVariable(\"hgservice_description\") == hgserviceData[i]['service description'])", - " {", - " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgserviceData[i]['hostgroup name'];", - " tests[\"Body contains added host hgservice_description\"] = postman.getEnvironmentVariable(\"hgservice_description\") == hgserviceData[i]['service description'];", - " break;", - " }", - " i++;", - " }", - " if (i == hgserviceData.length)", - " tests[\"hg_service_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"gethostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "44-Services_Categories", - "description": "Tests all commands to manage service categories.", - "item": [ - { - "name": "Setparam description", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};description;{{sc_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List service category", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var scData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of service categories\"] = scData;", - " var i = 0;", - " while (i < scData.length) {", - " if (postman.getEnvironmentVariable(\"sc_name\") == scData[i].name)", - " {", - " tests[\"Body contains added service category\"] = postman.getEnvironmentVariable(\"sc_name\") == scData[i].name;", - " tests[\"Body contains added description\"] = postman.getEnvironmentVariable(\"sc_description\") == scData[i].description;", - " break;", - " }", - " i++;", - " }", - " if (i == scData.length)", - " tests[\"sc_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"sc\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getservice", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serviceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of services\"] = serviceData;", - " var i = 0;", - " while (i < serviceData.length) {", - " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'])", - " {", - " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", - " tests[\"Body contains added service_description\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"service_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservicetemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getservicetemplate", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var stplData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of stpl_description\"] = stplData;", - " var i = 0;", - " while (i < stplData.length) {", - " if (postman.getEnvironmentVariable(\"stpl_description\") == hgserviceData[i]['service template description']){", - " tests[\"Body contains added stpl_description\"] = postman.getEnvironmentVariable(\"stpl_description\") == stplData[i]['service template description'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"stpl_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delservicetemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setservicetemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "50-Traps_Vendors", - "description": "Tests all commands to manage vendors.", - "item": [ - { - "name": "Add vendor", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;test_alias\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;name;{{vendor_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};alias;{{vendor_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam description", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};description;{{vendor_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List vendors", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var vendorData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of vendors\"] = vendorData;", - " var i = 0;", - " while (i < vendorData.length) {", - " if (postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name) {", - " tests[\"Body contains added vendor\"] = postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name;", - " tests[\"Body contains added vendor_alias\"] = postman.getEnvironmentVariable(\"vendor_alias\") == vendorData[i].alias;", - " break;", - " }", - " i++;", - " }", - " if (i == vendorData.length)", - " tests[\"vendor_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"show\",\n \"object\":\"vendor\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Generatetraps", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"generatetraps\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};{{mib_path}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "51-Traps_SNMP", - "description": "Tests all commands to manage traps.", - "item": [ - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};comments;{{trap_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam output", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};output;{{trap_output}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam oid", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};oid;{{trap_oid}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam status", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};status;{{trap_status}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam vendor", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};vendor;{{trap_vendor}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam matching_mode", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};matching_mode;{{trap_matching_mode}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam reschedule_svc_enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};reschedule_svc_enable;{{trap_reschedule_svc_enable}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam execution_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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam exec_command_enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command_enable;{{trap_exec_command_enable}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam submit_result_enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};submit_result_enable;{{trap_submit_result_enable}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List traps", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var trapData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of matchings\"] = trapData;", - " var i = 0;", - " while (i < trapData.length) {", - " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name) {", - " tests[\"Body contains added trap\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", - " tests[\"Body contains added trap oid\"] = postman.getEnvironmentVariable(\"trap_oid\") == trapData[i].oid;", - " break;", - " }", - " i++;", - " }", - " if (i == trapData.length)", - " tests[\"trap_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"show\",\n \"object\":\"trap\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addmatching", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};test_string;test_reg_exp;ok\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get matching id", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var matchingData = jsonData.result;", - "", - "try {", - " var i = 0;", - " while (i < matchingData.length) {", - " if (\"test_string\" == matchingData[i].string) {", - " postman.setEnvironmentVariable(\"trap_matching_token\",matchingData[i].id);", - " break;", - " }", - " i++;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Updatematching name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};string;{{trap_string}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Updatematching order", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};order;{{trap_matching_order}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Updatematching status", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};status;{{trap_status_string}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Updatematching regexp", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};regexp;{{trap_reg_exp}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmatching", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var matchingData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of matchings\"] = matchingData;", - " var i = 0;", - " while (i < matchingData.length) {", - " if (postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string) {", - " tests[\"Body contains added string\"] = postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string;", - " tests[\"Body contains added regular expression\"] = postman.getEnvironmentVariable(\"trap_reg_exp\") == matchingData[i].regexp;", - " tests[\"Body contains added matching status\"] = postman.getEnvironmentVariable(\"trap_status_string\") == matchingData[i].status;", - " tests[\"Body contains added matching order\"] = postman.getEnvironmentVariable(\"trap_matching_order\") == matchingData[i].order;", - " break;", - " }", - " i++;", - " }", - " if (i == matchingData.length)", - " tests[\"trap_string was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmatching", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "60-Downtimes", - "description": "Tests all commands to manage downtimes.", - "item": [ - { - "name": "Add downtime", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;descritpion_test\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;name;{{downtime_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam description", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};description;{{downtime_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List downtimes", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var downtimeData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of downtimes\"] = downtimeData;", - " var i = 0;", - " while (i < downtimeData.length) {", - " if (postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name){", - " tests[\"Body contains added downtime_name\"] = postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name;", - " tests[\"Body contains added downtime_description\"] = postman.getEnvironmentVariable(\"downtime_description\") == downtimeData[i].description;", - " break;", - " }", - " i++;", - " }", - " if (i == engineData.length)", - " tests[\"enine_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"DOWNTIME\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List RT downtimes", - "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\";", - "", - "var jsonData = JSON.parse(responseBody);", - "var result = jsonData.result;", - "", - "var schema = {", - " \"type\": \"array\",", - " \"items\": {", - " \"type\": \"object\",", - " \"properties\": {", - " \"author\": {", - " \"type\": \"string\"", - " },", - " \"actual start time\": {", - " \"type\": \"string\"", - " },", - " \"end time\": {", - " \"type\": \"string\"", - " },", - " \"comment data\": {", - " \"type\": \"string\"", - " },", - " \"duration\": {", - " \"type\": \"string\"", - " },", - " \"fixed\": {", - " \"type\": \"string\"", - " }", - " },", - " \"additionalProperties\": false,", - " \"required\": [\"author\", \"actual start time\", \"end time\", \"comment data\", \"duration\", \"fixed\"]", - " }", - "}", - "", - "tests[\"Validate schema JSON\"] = tv4.validate(result, schema);" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addweeklyperiod", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addweeklyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{weekly_start_time}};{{weekly_end_time}};{{weekly_fixed}};{{weekly_duration}};{{weekly_day_of_week}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addmonthlyperiod", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addmonthlyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{monthly_start_time}};{{monthly_end_time}};{{monthly_fixed}};{{monthly_duration}};{{monthly_day_of_month}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addspecificperiod", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addspecificperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{specific_start}};{{specific_end}};{{specific_fixed}};{{specific_duration}};{{specific_day_of_week}};{{specific_month_cycle}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List periods", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var downtimeData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of downtimes\"] = downtimeData;", - " var test_start_w = postman.getEnvironmentVariable(\"weekly_start_time\") + ':00';", - " var test_start_m = postman.getEnvironmentVariable(\"monthly_start_time\") + ':00';", - " var test_start_s = postman.getEnvironmentVariable(\"specific_start\") + ':00';", - " for (var i = 0; i < downtimeData.length; i++) {", - " if (test_start_w == downtimeData[i]['start time'])", - " {", - " tests[\"Body contains added weekly_start_time\"] = test_start_w == downtimeData[i]['start time'];", - " var test_end = postman.getEnvironmentVariable(\"weekly_end_time\") + ':00';", - " tests[\"Body contains added weekly_end_time\"] = test_end == downtimeData[i]['end time'];", - " tests[\"Body contains added weekly_fixed\"] = postman.getEnvironmentVariable(\"weekly_fixed\") == downtimeData[i].fixed;", - " if (downtimeData[i].fixed == \"0\")", - " tests[\"Body contains added weekly_duration\"] = postman.getEnvironmentVariable(\"weekly_duration\") == downtimeData[i].duration;", - " tests[\"Body contains added weekly_day_of_week\"] = postman.getEnvironmentVariable(\"weekly_number_days_of_week\") == downtimeData[i]['day of week'];", - " }", - " if (test_start_m == downtimeData[i]['start time'])", - " {", - " tests[\"Body contains added monthly_start_time\"] = test_start_m == downtimeData[1]['start time'];", - " var test_end = postman.getEnvironmentVariable(\"monthly_end_time\") + ':00';", - " tests[\"Body contains added monthly_end_time\"] = test_end == downtimeData[i]['end time'];", - " tests[\"Body contains added monthly_fixed\"] = postman.getEnvironmentVariable(\"monthly_fixed\") == downtimeData[i].fixed;", - " if (downtimeData[i].fixed == \"0\")", - " tests[\"Body contains added monthly_duration\"] = postman.getEnvironmentVariable(\"monthly_duration\") == downtimeData[i].duration;", - " tests[\"Body contains added monthly_day_of_month\"] = postman.getEnvironmentVariable(\"monthly_day_of_month\") == downtimeData[i]['day of month'];", - " }", - " if (test_start_s == downtimeData[i]['start time'])", - " {", - " tests[\"Body contains added specific_start_time\"] = test_start_s == downtimeData[i]['start time'];", - " var test_end = postman.getEnvironmentVariable(\"specific_end\") + ':00';", - " tests[\"Body contains added specific_end_time\"] = test_end == downtimeData[i]['end time'];", - " tests[\"Body contains added specific_fixed\"] = postman.getEnvironmentVariable(\"specific_fixed\") == downtimeData[i].fixed;", - " if (downtimeData[i].fixed == \"0\")", - " tests[\"Body contains added specific_duration\"] = postman.getEnvironmentVariable(\"specific_duration\") == downtimeData[i].duration;", - " tests[\"Body contains added specific_day_of_week\"] = postman.getEnvironmentVariable(\"specific_number_day_of_week\") == downtimeData[i]['day of week'];", - " }", - " }", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listperiods\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhost", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhost", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethost", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservicegroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delservicegroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setservicegroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhost Realtime", - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "postman.setGlobalVariable(\"fixed\", \"1\");", - "", - "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + ('0' + dateEnd.getHours()).slice(-2) + \":\" + ", - " ('0' + date.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", - "", - "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + ('0' + dateEnd.getHours()).slice(-2) + \":\" + ", - "('0' + dateEnd.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"end_time\", datetime_end);", - "" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;esx-alger-01;{{actual_start_time}};{{end_time}};1;3600;0;Faut pas renifler de la confiture sinon ça fait tousser\"\n}\n" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservice Realtime", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - }, - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "postman.setGlobalVariable(\"fixed\", \"1\");", - "", - "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", - " ('0' + date.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", - "", - "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", - "('0' + dateEnd.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"end_time\", datetime_end);" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;esx-alger-01|cpu;{{actual_start_time}};{{end_time}};1;3600;0;les pates de CANNNNAAAAAAAARRRRD;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhostgroup Realtime", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - }, - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "postman.setGlobalVariable(\"fixed\", \"1\");", - "", - "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", - " ('0' + date.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", - "", - "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", - "('0' + dateEnd.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"end_time\", datetime_end);" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HG;Databases1;{{actual_start_time}};{{end_time}};1;3600;0;les pates de CANNNNAAAAAAAARRRRD;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservicegroup Realtime", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - }, - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "postman.setGlobalVariable(\"fixed\", \"1\");", - "", - "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", - " ('0' + date.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", - "", - "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", - "('0' + dateEnd.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"end_time\", datetime_end);" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SG;Traffic-Europe;{{actual_start_time}};{{end_time}};1;3600;0;les pates de CANNNNAAAAAAAARRRRD;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addinstance Realtime", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - }, - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "postman.setGlobalVariable(\"fixed\", \"1\");", - "", - "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", - " ('0' + date.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", - "", - "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", - "('0' + dateEnd.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"end_time\", datetime_end);" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;Central;{{actual_start_time}};{{end_time}};1;3600;0;les pates de CANNNNAAAAAAAARRRRD;\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "61-Dependencies", - "description": "Tests all commands to manage dependencies.", - "item": [ - { - "name": "Add dependency", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"dep\",\n \"values\": \"dep_test;test_description;{{dep_type}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"dep_test;name;{{dep_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam description", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};description;{{dep_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};comment;{{dep_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam inherits_parent", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};inherits_parent;{{dep_inherits_parent}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam exec_fail_criteria", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};execution_failure_criteria;{{dep_exec_fail_crit}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notif_fail_criteria", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};notification_failure_criteria;{{dep_notif_fail_crit}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List dependencies", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var depData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of dependencies\"] = depData;", - " var i = 0;", - " while (i < depData.length) {", - " if (postman.getEnvironmentVariable(\"dep_name\") == depData[i].name)", - " {", - " tests[\"Body contains added dep_name\"] = postman.getEnvironmentVariable(\"dep_name\") == depData[i].name;", - " tests[\"Body contains added dep_description\"] = postman.getEnvironmentVariable(\"dep_description\") == depData[i].description;", - " tests[\"Body contains added dep_inherits_parents\"] = postman.getEnvironmentVariable(\"dep_inherits_parent\") == depData[i].inherits_parent;", - " tests[\"Body contains added dep_execution_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_exec_fail_crit\") == depData[i].execution_failure_criteria;", - " tests[\"Body contains added dep_notification_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_notif_fail_crit\") == depData[i].notification_failure_criteria;", - " break;", - " }", - " i++;", - " }", - " if (i == depData.length)", - " tests[\"dep_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"dep\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create host3", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name3}};{{host_name3}};0.0.0.0;;central;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addchild", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Listdep", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var depData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of dependencies\"] = depData;", - " var i = 0;", - " var nb_find = 0", - " while (i < depData.length) {", - " if (postman.getEnvironmentVariable(\"host_name\") == depData[i].parents)", - " {", - " tests[\"Body contains added a parent\"] = postman.getEnvironmentVariable(\"host_name\") == depData[i].parents;", - " nb_find += 1;", - " }", - " if (postman.getEnvironmentVariable(\"host_name3\") == depData[i].children)", - " {", - " tests[\"Body contains added a child\"] = postman.getEnvironmentVariable(\"host_name3\") == depData[i].children;", - " nb_find += 1;", - " }", - " if (nb_find == 2)", - " break;", - " i++;", - " }", - " if (i == depData.length)", - " tests[\"the child and the parent were found\"] = i < depData.length;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listdep\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delchild", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "70-ACL_Groups", - "description": "Tests all commands to manage ACL groups.", - "item": [ - { - "name": "Add ACL group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;aclg_alias\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;name;{{aclg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};alias;{{aclg_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};activate;{{aclg_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List ACL groups", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL groups\"] = aclgData;", - " var i = 0;", - " while (i < aclgData.length) {", - " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", - " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", - " tests[\"Body contains added aclg_alias\"] = postman.getEnvironmentVariable(\"aclg_alias\") == aclgData[i].alias;", - " tests[\"Body contains added aclg_activate\"] = postman.getEnvironmentVariable(\"aclg_activate\") == aclgData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == aclgData.length)", - " tests[\"aclg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"aclgroup\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add resource ACL", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;test_alias\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;name;{{racl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addresource", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delresource", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setresource", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getresource", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var raclData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL resources\"] = raclData;", - " var i = 0;", - " while (i < raclData.length) {", - " if (postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name) {", - " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == raclData.length)", - " tests[\"racl_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", - " tests[\"Body contains added contact\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"aclg_contact_alias was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontactgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add ACL Menu", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;test_alias\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;name;{{aclmenu_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addmenu", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmenu", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmenu", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmenu", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclmenuData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL menus\"] = aclmenuData;", - " var i = 0;", - " while (i < aclmenuData.length) {", - " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", - " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == aclmenuData.length)", - " tests[\"menu_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add ACL action", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;acla_description\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;name;{{acla_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addaction", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delaction", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setaction", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getaction", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclaData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL actions\"] = aclaData;", - " var i = 0;", - " while (i < aclaData.length) {", - " if (postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name) {", - " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == aclaData.length)", - " tests[\"acla_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "71-ACL_Menus", - "description": "Tests all commands to manage ACL menu.", - "item": [ - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};alias;{{aclmenu_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};activate;{{aclmenu_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};comment;{{aclmenu_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List ACL menu", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclmenuData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL Menu\"] = aclmenuData;", - " var i = 0;", - " while (i < aclmenuData.length) {", - " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", - " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", - " tests[\"Body contains added aclmenu_alias\"] = postman.getEnvironmentVariable(\"aclmenu_alias\") == aclmenuData[i].alias;", - " tests[\"Body contains added aclmenu_comment\"] = postman.getEnvironmentVariable(\"aclmenu_comment\") == aclmenuData[i].comment;", - " tests[\"Body contains added aclmenu_activate\"] = postman.getEnvironmentVariable(\"aclmenu_activate\") == aclmenuData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == aclmenuData.length)", - " tests[\"aclmenu_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"aclmenu\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get ACL Groups", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL Menu\"] = aclgData;", - " var i = 0;", - " while (i < aclgData.length) {", - " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", - " tests[\"Body contains ACL menu\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i > aclgData.length)", - " tests[\"aclg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw Home", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke Home", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw Custom Views", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke Custom Views", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw Edit View", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke Edit View", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw Share View", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke Share View", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw Widget Parameters", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke Widget Parameters", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw Add Widget", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke Add Widget", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw rotation", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke rotation", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw delete view", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke delete view", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw add view", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke add view", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw set default", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke set default", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw poller statistics", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke poller statistics", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw broker statistics", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke broker statistics", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw graphs (poller)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke graphs (poller)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw monitoring", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke monitoring", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw status details", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke status details", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services (monitoring)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services (monitoring)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw hosts (monitoring)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke hosts (monitoring)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services grid", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services grid", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services by hostgroup", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services by hostgroup", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services by servicegroup", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services by servicegroup", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw hostgroups summary", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke hostgroups summary", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw performances", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke performances", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw graphs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke graphs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw chart split", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke chart split", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw chart periods", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke chart periods", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw templates (perf)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke templates (perf)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw curves", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke curves", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw metrics", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke metrics", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw event logs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke event logs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw event logs (advanced)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke event logs (advanced)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw system logs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke system logs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw downtimes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke downtimes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw downtimes (main menu)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke downtimes (main menu)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw recurrent downtimes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro recurrent downtimes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke recurrent downtimes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw comments", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke comments", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw reporting", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke reporting", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw dashboard", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke dashboard", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw hosts (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke hosts (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw host groups (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host groups (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw service groups (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service groups (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant hostsrw (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke hosts (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant hostsrw (config/host)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant hostsro (config/host)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke hosts (config/host)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw host groups (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro host groups (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host groups (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw templates (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro templates (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke templates (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw categories (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro categories (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke categories (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services by host (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro services by host (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services by host (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services by host group (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro services by host group (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services by host group (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw service groups (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro service groups (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service groups (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw templates (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro templates (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke templates (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw categories (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro categories (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke categories (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw meta services(config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke meta services(config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw users", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke users", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw Contacts / Users", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro Contacts / Users", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke Contacts / Users", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw contact templates", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro contact templates", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke contact templates", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw contact groups", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro contact groups", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke contact groups", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw time periods", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro time periods", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke time periods", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw commands", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke commands", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw discovery", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro discovery", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke discovery", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw miscellaneous", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro miscellaneous", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke miscellaneous", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw connectors", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro connectors", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke connectors", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw escalations", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro escalations", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke escalations", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw hosts (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro hosts (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke hosts (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw host groups (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro host groups (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host groups (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services(dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro services(dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services(dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw service groups(dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro service groups(dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service groups(dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw meta services (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro meta services (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke meta services (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw SNMP traps (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke SNMP traps (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw SNMP traps (SNMP)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;snmp traps\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke SNMP traps (SNMP)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;snmp traps\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw manufacturer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;manufacturer\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke manufacturer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;manufacturer\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw group (SNMP)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;group\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke group (SNMP)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;group\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw mibs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;mibs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke mibs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;mibs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw generate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;generate\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke generate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;generate\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw knowledge base", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke knowledge base", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw hosts (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke hosts (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw host templates (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;host templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host templates (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;host templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw service templates (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;service templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service templates (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;service templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw pollers (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke pollers (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw export configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;export configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke export configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;export configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw pollers (pollers)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro pollers (pollers)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke pollers (pollers)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw engine configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro engine configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke engine configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw broker configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke broker configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw wizard", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizard\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke wizard", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizard\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw wizardajax", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizardajax\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke wizardajax", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizardajax\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw resources", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;resources\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke resources", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;resources\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw administration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke administration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw parameters", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke parameters", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw centreon UI", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centreon UI\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke centreon UI", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centreon UI\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw monitoring (parameters)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;monitoring\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke monitoring (parameters)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;monitoring\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw centcore", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centcore\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke centcore", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centcore\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw my account", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;my account\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke my account", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;my account\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw LDAP", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;LDAP\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke LDAP", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;LDAP\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw RRDtool", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;RRDtool\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke RRDtool", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;RRDtool\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw debug", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;debug\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke debug", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;debug\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw knowledge base (parameters)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;knowledge base\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke knowledge base (parameters)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;knowledge base\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw CSS", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;CSS\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke CSS", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;CSS\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw backup", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;backup\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke backup", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;backup\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;options\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;options\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw data", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;data\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke data", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;data\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw images", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;images\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke images", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;images\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw extensions", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke extensions", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw modules", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;modules\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke modules", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;modules\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw widgets", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;widgets\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke widgets", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;widgets\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw ACL", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke ACL", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw access groups", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;access groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke access groups", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;access groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw menus access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;menus access\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke menus access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;menus access\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw resources access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;resources access\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke resources access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;resources access\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw actions access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;actions access\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke actions access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;actions access\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw reload ACL", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;reload ACL\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke reload ACL", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;reload ACL\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw logs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke logs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw visualisation", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs;visualisation\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke visualisation", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs;visualisation\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw sessions", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;sessions\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke sessions", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;sessions\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw server status", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke server status", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw databases", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status;databases\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke databases", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status;databases\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw about (admin)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke about (admin)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw about (about)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about;about\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke about (about)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about;about\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "72-ACL_Resources", - "description": "Tests all commands to manage Resource ACL.", - "item": [ - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};alias;{{racl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};activate;{{racl_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List resource ACL", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var raclData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL resource\"] = raclData;", - " var i = 0;", - " while (i < raclData.length) {", - " if (postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name) {", - " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name;", - " tests[\"Body contains added racl_alias\"] = postman.getEnvironmentVariable(\"racl_alias\") == raclData[i].alias;", - " tests[\"Body contains added racl_activate\"] = postman.getEnvironmentVariable(\"racl_activate\") == raclData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == raclData.length)", - " tests[\"racl_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"aclresource\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getaclgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL groups\"] = aclgData;", - " var i = 0;", - " while (i < aclgData.length) {", - " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", - " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == aclgData.length)", - " tests[\"aclg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant_host", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant_host\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke_host", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke_host\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant_hostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant_hostgroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke_hostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke_hostgroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant_servicegroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant_servicegroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke_servicegroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke_servicegroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "addhostexclusion", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhostexclusion\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "delhostexclusion", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhostexclusion\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "addfilter_instance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addfilter_instance\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "delfilter_instance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delfilter_instance\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "addfilter_hostcategory", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addfilter_hostcategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "delfilter_hostcategory", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delfilter_hostcategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "addfilter_servicecategory", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addfilter_servicecategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "delfilter_servicecategory", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delfilter_servicecategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "74-ACL_Actions", - "description": "Tests all commands to manage ACL action.", - "item": [ - { - "name": "Setparam description", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};description;{{acla_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};activate;{{acla_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List ACL actions", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclaData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL actions\"] = aclaData;", - " var i = 0;", - " while (i < aclaData.length) {", - " if (postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name) {", - " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name;", - " tests[\"Body contains added acla_description\"] = postman.getEnvironmentVariable(\"acla_description\") == aclaData[i].description;", - " tests[\"Body contains added acla_activate\"] = postman.getEnvironmentVariable(\"acla_activate\") == aclaData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == aclaData.length)", - " tests[\"acla_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"aclaction\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getaclgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclaData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL actions\"] = aclaData;", - " var i = 0;", - " while (i < aclaData.length) {", - " if (postman.getEnvironmentVariable(\"aclg_name\") == aclaData[i].name) {", - " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclaData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == aclaData.length)", - " tests[\"aclg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_event_handler", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_event_handler\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_event_handler", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_event_handler\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_flap_detection", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_flap_detection\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_flap_detection", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_flap_detection\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_host_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_host_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_host_obsess", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_obsess\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_host_obsess", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_obsess\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_host_passive_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_passive_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_host_passive_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_passive_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_perf_data", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_perf_data\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_perf_data", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_perf_data\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_restart", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_restart\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_restart", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_restart\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_service_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_service_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_service_obsess", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_obsess\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_service_obsess", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_obsess\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_service_passive_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_passive_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_service_passive_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_passive_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_shutdown", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_shutdown\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_shutdown", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_shutdown\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_acknowledgement", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_acknowledgement\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_acknowledgement", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_acknowledgement\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_checks_for_services", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks_for_services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_checks_for_services", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks_for_services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_comment\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_comment\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_event_handler", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_event_handler\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_event_handler", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_event_handler\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_flap_detection", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_flap_detection\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_flap_detection", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_flap_detection\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_notifications_for_services", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications_for_services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_notigications_for_services", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications_for_services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_schedule_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_schedule_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_schedule_downtime", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_forced_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_schedule_downtime", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_downtime\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_schedule_forced_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_forced_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_schedule_forced_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_forced_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_submit_result", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_submit_result\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_submit_result", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_submit_result\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant poller_listing", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_listing\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke poller_listing", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_listing\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant poller_stats", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_stats\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke poller_stats", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_stats\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_acknowledgement", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_acknowledgement\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_acknowledgement", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_acknowledgement\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_comment\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_comment\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_event_handler", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_event_handler\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_event_handler", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_event_handler\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_flap_detection", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_flap_detection\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_flap_detection", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_flap_detection\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_passive_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_passive_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_passive_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_passive_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_schedule_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_schedule_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_schedule_downtime", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_downtime\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_schedule_downtime", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_downtime\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_schedule_forced_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_forced_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_schedule_forced_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_forced_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_submit_result", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_submit_result\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_submit_result", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_submit_result\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant top_counter", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};top_counter\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke top_counter", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};top_counter\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "75-ACL_Reload", - "description": "Tests all commands to manage ACL.", - "item": [ - { - "name": "Reload", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"reload\",\n \"object\": \"acl\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Lastreload", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"lastreload\",\n \"object\": \"acl\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Lastreload input time", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"lastreload\",\n \"object\": \"acl\",\n \"values\": \"lastreload_time\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "80-Administration_General_Settings", - "description": "Tests all commands to manage settings.", - "item": [ - { - "name": "Setparam broker", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"broker;{{broker_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam broker_correlator_script", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"broker_correlator_script;{{broker_correlator_script}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam centstorage", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"centstorage;{{centstorage_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam debug_auth", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_auth;{{enable_debug_auth}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam debug_ldap_import", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_ldap_import;{{enable_ldap_debug}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam debug_nagios_import", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_nagios_import;{{enable_nagios_debug}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam debug_path", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_path;{{debug_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam debug_rrdtool", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_rrdtool;{{enable_debug_rrdtool}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam enable_autologin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_autologin;{{enable_autologin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam enable_gmt", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_gmt;{{enable_gmt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam enable_logs_sync", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_logs_sync;{{enable_logs_sync}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam enable_perfdata_sync", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_perfdata_sync;{{enable_perfdata_sync}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam gmt", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"gmt;{{gmt_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam interval_length", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"interval_length;{{interval_length}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam mailer_path_bin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"mailer_path_bin;{{mailer_path_bin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam nagios_path_img", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"nagios_path_img;{{nagios_path_img}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam perl_library_path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"perl_library_path;{{perl_library_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam rrdtool_path_bin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"rrdtool_path_bin;{{rrdtool_path_bin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam snmpttconvertmib_path_bin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"snmpttconvertmib_path_bin;{{snmpttconvertmib_path_bin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam snmptt_unknowntrap_log_file", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"snmptt_unknowntrap_log_file;{{snmptt_unknowntrap_log_file}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List settings", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var exceptionData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of exceptions\"] = exceptionData;", - " for (var i = 0; i < exceptionData.length; i++) {", - " switch (exceptionDate[i].parameter)", - " {", - " case \"broker\":", - " tests[\"Body contains the correct setting broker\"] = postman.getEnvironmentVariable(\"broker_value\") == exceptionData[i].value;", - " break;", - " case \"broker_correlator_script\":", - " tests[\"Body contains the correct setting broker_correlator_script\"] = postman.getEnvironmentVariable(\"broker_correlator_script\") == exceptionData[i].value;", - " break;", - " case \"debug_auth\":", - " tests[\"Body contains the correct setting debug_auth\"] = postman.getEnvironmentVariable(\"enable_debug_auth\") == exceptionData[i].value;", - " break;", - " case \"debug_ldap_import\":", - " tests[\"Body contains the correct setting debug_ldap_import\"] = postman.getEnvironmentVariable(\"enable_ldap_debug\") == exceptionData[i].value;", - " break;", - " case \"debug_nagios_import\":", - " tests[\"Body contains the correct setting debug_nagios_ldap\"] = postman.getEnvironmentVariable(\"enable_nagios_debug\") == exceptionData[i].value;", - " break;", - " case \"debug_path\":", - " tests[\"Body contains the correct setting debug_path\"] = postman.getEnvironmentVariable(\"debug_path\") == exceptionData[i].value;", - " break;", - " case \"debug_rrdtool\":", - " tests[\"Body contains the correct setting debug_rrdtool\"] = postman.getEnvironmentVariable(\"enable_debug_rrdtool\") == exceptionData[i].value;", - " break;", - " case \"enable_autologin\":", - " tests[\"Body contains the correct setting enable_authologin\"] = postman.getEnvironmentVariable(\"enable_autologin\") == exceptionData[i].value;", - " break;", - " case \"enable_logs_sync\":", - " tests[\"Body contains the correct setting enable_logs_sync\"] = postman.getEnvironmentVariable(\"enable_logs_sync\") == exceptionData[i].value;", - " break;", - " case \"enable_perfdata_sync\":", - " tests[\"Body contains the correct setting enable_logs_sync\"] = postman.getEnvironmentVariable(\"enable_logs_sync\") == exceptionData[i].value;", - " break;", - " case \"enable_perfdata_sync\":", - " tests[\"Body contains the correct setting enable_perfdata_sync\"] = postman.getEnvironmentVariable(\"enable_perfdata_sync\") == exceptionData[i].value;", - " break;", - " case \"gmt\":", - " tests[\"Body contains the correct setting gmt\"] = postman.getEnvironmentVariable(\"gmt_value\") == exceptionData[i].value;", - " break;", - " case \"interval_length\":", - " tests[\"Body contains the correct setting interval_length\"] = postman.getEnvironmentVariable(\"interval_length\") == exceptionData[i].value;", - " break;", - " case \"mailer_path_bin\":", - " tests[\"Body contains the correct setting mailer_path_bin\"] = postman.getEnvironmentVariable(\"mailer_path_bin\") == exceptionData[i].value;", - " break;", - " case \"nagios_path_img\":", - " tests[\"Body contains the correct setting nagios_path_img\"] = postman.getEnvironmentVariable(\"nagios_path_img\") == exceptionData[i].value;", - " break;", - " case \"perl_library_path\":", - " tests[\"Body contains the correct setting perl_library_path\"] = postman.getEnvironmentVariable(\"perl_library_path\") == exceptionData[i].value;", - " break;", - " case \"rrdtool_path_bin\":", - " tests[\"Body contains the correct setting rrdtool_path_bin\"] = postman.getEnvironmentVariable(\"rrdtool_path_bin\") == exceptionData[i].value;", - " break;", - " case \"snmpttconvertmib_path_bin\":", - " tests[\"Body contains the correct setting snmpttconvertmib_path_bin\"] = postman.getEnvironmentVariable(\"snmpttconvertmib_path_bin\") == exceptionData[i].value;", - " break;", - " case \"snmptt_unknowntrap_log_file\":", - " tests[\"Body contains the correct setting snmptt_unknowntrap_log_file\"] = postman.getEnvironmentVariable(\"snmptt_unknowntrap_log_file\") == exceptionData[i].value;", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"show\",\n \"object\":\"settings\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "81-Administration_LDAP_Settings", - "description": "Tests all commands to manage LDAP.", - "item": [ - { - "name": "Add LDAP", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"ldap\",\n \"values\": \"test_ldap;test_description\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"test_ldap;name;{{ldap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam description", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};description;{{ldap_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};enable;{{ldap_enable}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};alias;{{ldap_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam bind_dn", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};bind_dn;{{ldap_bind_dn}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam bind_pass", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};bind_pass;{{ldap_bind_pass}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam group_base_search", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_base_search;{{ldap_group_base_search}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam group_filter", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_filter;{{ldap_group_filter}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam group_member", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_member;{{ldap_group_member}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam group_name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_name;{{ldap_group_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_auto_import", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_auto_import;{{ldap_auto_import}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_contact_tmpl", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_contact_tmpl;{{ctpl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_dns_use_domain", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_dns_use_domain;{{ldap_dns_use_domain}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_search_limit", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_search_limit;{{ldap_search_limit}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_search_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_search_timeout;{{ldap_search_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_srv_dns", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_srv_dns;{{ldap_srv_dns}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_store_password", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_store_password;{{ldap_store_pwd}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_template", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_template;{{ldap_tpl}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam protocol_version", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};protocol_version;{{ldap_protocol_version}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_base_search", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_base_search;{{ldap_user_base_search}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_email", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_email;{{ldap_user_email}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_filter", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_filter;{{ldap_user_filter}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_firstname", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_firstname;{{ldap_user_firstname}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_lastname", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_lastname;{{ldap_user_lastname}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_name;{{ldap_user_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_pager", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_pager;{{ldap_user_pager}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_group;{{ldap_user_group}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List LDAP", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var ldapData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ldap configurations\"] = ldapData;", - " var i = 0;", - " while (i < ldapData.length) {", - " if (postman.getEnvironmentVariable(\"ldap_name\") == ldapData[i].name) {", - " tests[\"Body contains added ldap_name\"] = postman.getEnvironmentVariable(\"ldap_name\") == ldapData[i].name;", - " tests[\"Body contains added ldap_description\"] = postman.getEnvironmentVariable(\"ldap_description\") == ldapData[i].description;", - " tests[\"Body contains added ldap_enable\"] = postman.getEnvironmentVariable(\"ldap_enable\") == ldapData[i].status;", - " break;", - " }", - " i++;", - " }", - " if (i == ldapData.length)", - " tests[\"ldap_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"ldap\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addserver", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};{{ldap_server_address}};{{ldap_server_port}};{{ldap_use_ssl}};{{ldap_use_tls}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get server id", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serverData = jsonData.result;", - "", - "try {", - " var i = 0;", - " while (i < serverData.length) {", - " if (postman.getEnvironmentVariable(\"ldap_server_address\") == serverData[i].address) {", - " postman.setEnvironmentVariable(\"ldap_server_id\",serverData[i].id);", - " break;", - " }", - " i++;", - " }", - " if (i == serverData.length)", - " tests[\"ldap_server_adress was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"showserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparamserver host_address", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};host_address;{{ldap_host_address}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparamserver host_port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};host_port;{{ldap_host_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparamserver host_order", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};host_order;{{ldap_host_order}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparamserver use_ssl", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};use_ssl;{{ldap_use_ssl_changed}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparamserver use_tls", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};use_tls;{{ldap_use_tls_changed}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Showserver", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serverData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of servers\"] = serverData;", - " var i = 0;", - " while (i < serverData.length) {", - " if (postman.getEnvironmentVariable(\"ldap_host_address\") == serverData[i].address) {", - " tests[\"Body contains added server\"] = postman.getEnvironmentVariable(\"ldap_host_address\") == serverData[i].address;", - " tests[\"Body contains added server_port\"] = postman.getEnvironmentVariable(\"ldap_host_port\") == serverData[i].port;", - " tests[\"Body contains added server_use_ssl\"] = postman.getEnvironmentVariable(\"ldap_use_ssl_changed\") == serverData[i].ssl;", - " tests[\"Body contains added server_use_tls\"] = postman.getEnvironmentVariable(\"ldap_use_tls_changed\") == serverData[i].tls;", - " tests[\"Body contains added server_use_tls\"] = postman.getEnvironmentVariable(\"ldap_host_order\") == serverData[i].order;", - " break;", - " }", - " i++;", - " }", - " if (i == serverData.length)", - " tests[\"ldap_server_address was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"showserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delserver", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "90-Engine_CFG", - "description": "Tests all commands to manage ACL.", - "item": [ - { - "name": "Add engine_CFG", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_nagios_config}};{{instance_name}};{{engine_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_nagios_config}};nagios_name;{{engine_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam instance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};instance;{{instance_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam broker_module", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};broker_module;{{instance_broker_module}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};nagios_activate;{{instance_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List engine_CFG", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var engineData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of downtimes\"] = engineData;", - " var i = 0;", - " while (i < engineData.length) {", - " if (postman.getEnvironmentVariable(\"engine_name\") == engineData[i]['nagios name']){", - " tests[\"Body contains added engine_name\"] = postman.getEnvironmentVariable(\"engine_name\") == engineData[i]['nagios name'];", - " tests[\"Body contains added instance_name2\"] = postman.getEnvironmentVariable(\"instance_name2\") == engineData[i].instance;", - " tests[\"Body contains added engine_comment\"] = postman.getEnvironmentVariable(\"engine_comment\") == engineData[i]['nagios comment'];", - " break;", - " }", - " i++;", - " }", - " if (i == engineData.length)", - " tests[\"engine_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"enginecfg\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addbrokermodule", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addbrokermodule\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};{{instance_broker_module2}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "99-Delete", - "description": "", - "item": [ - { - "name": "Del ACL action", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del ACL group", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del ACL Menu", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del resource ACL", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del 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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del contact group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del ctpl", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del ctpl2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del contact", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del contact2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del dependencies", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del downtime", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del engine_CFG", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del host category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del hgservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del host group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del host group2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del resource CFG", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del Instance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del Instance2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del service", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del host3", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"host\",\n \"values\": \"{{host_name3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del htpl2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del htpl3", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del LDAP", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del service group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del service template", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del service template2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del service category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del host", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del htpl", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del tp", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del trap", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del vendor", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delinput ipv4", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delinput ipv6", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delinput file", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Dellogger file", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Dellogger standard", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Dellogger syslog", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Dellogger monitoring", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deloutput ipv4", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deloutput ipv6", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deloutput file", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deloutput rrd", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deloutput storage", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deloutput sql", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del broker", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del host2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - } - ] + "variables": [], + "info": { + "name": "Centreon Web Rest API copy", + "_postman_id": "e687a42e-6678-d1f4-1fcf-14cd2867c15c", + "description": "", + "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" + }, + "item": [ + { + "name": "00-Configure_Poller", + "description": "", + "item": [ + { + "name": "Authenticate", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "postman.setEnvironmentVariable(\"token\",jsonData.authToken);" + ] + } + } + ], + "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" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/x-www-form-urlencoded" + } + ], + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "key": "username", + "type": "text", + "value": "{{api_user}}" + }, + { + "key": "password", + "type": "text", + "value": "{{api_password}}" + } + ] + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add Instance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"instance\",\n \"values\": \"test_instance;01.02.3.04;42;nagios\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"test_instance;name;{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam localhost", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};localhost;{{instance_localhost}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ns_ip_address", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};ns_ip_address;{{instance_address}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ns_activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};ns_activate;{{instance_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam init_script", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};init_script;{{instance_init_script}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam monitoring_engine", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};monitoring_engine;{{instance_monitoring_engine}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam nagios_bin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};nagios_bin;{{instance_nagios_bin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam nagiostats_bin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};nagiostats_bin;{{instance_nagiostats_bin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam nagios_perfdata", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};nagios_perfdata;{{instance_nagios_perfdata}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ssh_port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};ssh_port;{{instance_ssh_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam centreonbroker_cfg_path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};centreonbroker_cfg_path;{{instance_broker_cfg_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam centreonbroker_module_path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};centreonbroker_module_path;{{instance_broker_module_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List instances", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var instanceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of instances\"] = instanceData;", + " var i = 0;", + " while (i < instanceData.length) {", + " if (postman.getEnvironmentVariable(\"instance_name\") == instanceData[i].name) {", + " tests[\"Body contains added instance\"] = postman.getEnvironmentVariable(\"instance_name\") == instanceData[i].name;", + " tests[\"Body contains added instance_localhost\"] = postman.getEnvironmentVariable(\"instance_localhost\") == instanceData[i].localhost;", + " tests[\"Body contains added instance_address\"] = postman.getEnvironmentVariable(\"instance_address\") == instanceData[i]['ip address'];", + " tests[\"Body contains added instance_activate\"] = postman.getEnvironmentVariable(\"instance_activate\") == instanceData[i].activate;", + " tests[\"Body contains added instance_init_script\"] = postman.getEnvironmentVariable(\"instance_init_script\") == instanceData[i]['init script'];", + " tests[\"Body contains added instance_nagios_bin\"] = postman.getEnvironmentVariable(\"instance_nagios_bin\") == instanceData[i].bin;", + " tests[\"Body contains added instance_nagiostats_bin\"] = postman.getEnvironmentVariable(\"instance_nagiostats_bin\") == instanceData[i]['stats bin'];", + " tests[\"Body contains added instance_ssh_port\"] = postman.getEnvironmentVariable(\"instance_ssh_port\") == instanceData[i]['ssh port'];", + " break;", + " }", + " i++;", + " }", + " if (i == instanceData.length)", + " tests[\"instance_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"instance\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create host2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}};{{host_name2}};0.0.0.0;;central;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create Instance-2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name2}};01.3.04.65;98;nagios\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinstance host", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinstance\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}};{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gethosts", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hostData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of hosts\"] = hostData;", + " var i = 0;", + " while (i < hostData.length) {", + " if (postman.getEnvironmentVariable(\"instance_host\") == hostData[i].name) {", + " break;", + " }", + " i++;", + " }", + " tests[\"Body contains added host\"] = postman.getEnvironmentVariable(\"instance_host\") == hostData[i].generic-active-host;", + " tests[\"Body contains added host_address\"] = postman.getEnvironmentVariable(\"host_address\") == hostData[i]['0.0.0.1'];", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"gethosts\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "01-Configure_Centreon_Engine", + "description": "", + "item": [ + { + "name": "Add resource CFG", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"resourcecfg\",\n \"values\": \"test_resourcecfg;test_value;{{instance_name}};test_comment\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get ressource id", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var resourceData = jsonData.result;", + "", + "try {", + " var i = 0;", + " while (i < resourceData.length) {", + " if (\"$test_resourcecfg$\" == resourceData[i].name) {", + " postman.setEnvironmentVariable(\"resourcecfg_id\",resourceData[i].id);", + " break;", + " }", + " i++;", + " }", + " if (i == resourceData.length)", + " tests[\"the resourcecfg was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"resourcecfg\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};name;{{rcfg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam value", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};value;{{rcfg_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};activate;{{rcfg_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};comment;{{rcfg_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam instance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};instance;{{rcfg_instance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List resource CFG", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var rcfgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of resources CFG\"] = rcfgData;", + " var i = 0;", + " var rcfgname = \"$\"+ postman.getEnvironmentVariable(\"rcfg_name\") + \"$\";", + " while (i < rcfgData.length) {", + " if (rcfgname == rcfgData[i].name) {", + " tests[\"Body contains added resource CFG\"] = rcfgname == rcfgData[i].name;", + " tests[\"Body contains added rcfg_value\"] = postman.getEnvironmentVariable(\"rcfg_value\") == rcfgData[i].value;", + " tests[\"Body contains added rcfg_comment\"] = postman.getEnvironmentVariable(\"rcfg_comment\") == rcfgData[i].comment;", + " tests[\"Body contains added rcfg_activate\"] = postman.getEnvironmentVariable(\"rcfg_activate\") == rcfgData[i].activate;", + " tests[\"Body contains added rcfg_instance\"] = postman.getEnvironmentVariable(\"rcfg_instance\") == rcfgData[i].instance;", + " break;", + " }", + " i++;", + " }", + " if (i == rcfgData.length)", + " tests[\"rcfg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"resourcecfg\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "02-Configure_Centreon_Broker", + "description": "", + "item": [ + { + "name": "Add broker", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"centbrokercfg\",\n \"values\": \"broker_test;{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"broker_test;name;{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List brokers", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var brokerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of brokers\"] = brokerData;", + " var i = 0;", + " while (i < brokerData.length) {", + " if (postman.getEnvironmentVariable(\"broker_name\") == brokerData[i]['config name']) {", + " tests[\"Body contains added broker_name\"] = postman.getEnvironmentVariable(\"broker_name\") == brokerData[i]['config name'];", + " tests[\"Body contains added instance_name\"] = postman.getEnvironmentVariable(\"instance_name\") == brokerData[i].instance;", + " break;", + " }", + " i++;", + " }", + " if (i == brokerData.length)", + " tests[\"broker_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"centbrokercfg\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam filename", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};filename;{{broker_filename}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam instance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};instance;{{instance_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_queue_max_size", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};event_queue_max_size;{{broker_event_queue_max_size}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cache_directory", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};cache_directory;{{broker_cache_directory}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam daemon", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};daemon;{{broker_daemon}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam stats_activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};stats_activate;{{broker_stats_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam correlation_activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};correlation_activate;{{broker_correlation_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addinput ipv4", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_name_ipv4}};ipv4;1\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get input_key ipv4", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var inputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of inputs\"] = inputData;", + " var i = 0;", + " while (i < inputData.length) {", + " if (postman.getEnvironmentVariable(\"input_name_ipv4\") == inputData[i].name) {", + " postman.setEnvironmentVariable(\"input_ipv4_id\",inputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == inputData.length){", + " tests[\"input_name_ipv4 was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};buffering_timeout;{{input_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};compression;{{input_compression}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression_buffer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};compression_buffer;{{input_compression_buffer}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression_level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};compression_level;{{input_compression_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};retry_interval;{{input_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};category;{{input_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput ca_certificate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};ca_certificate;{{input_ca_certificate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput host", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};host;{{input_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput one_peer_retention_mode", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};one_peer_retention_mode;{{input_one_peer_retention_mode}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};port;{{input_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput private_key", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};private_key;{{input_private_key}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput protocol", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};protocol;{{input_protocol}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput public_cert", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};public_cert;{{input_public_cert}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput tls", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};tls;{{input_tls}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getinput ipv4", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var inputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of inputs\"] = inputData;", + " for (var i = 0; i < inputData.length; i++) {", + " switch (inputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added input_buffering_timeout\"] = postman.getEnvironmentVariable(\"input_buffering_timeout\") == inputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added input_category\"] = postman.getEnvironmentVariable(\"input_category\") == inputData[i]['parameter value'];", + " break;", + " case \"ca_certificate\":", + " tests[\"Body contains added input_ca_certificate\"] = postman.getEnvironmentVariable(\"input_ca_certificate\") == inputData[i]['parameter value'];", + " break;", + " case \"compression\":", + " tests[\"Body contains added input_compression\"] = postman.getEnvironmentVariable(\"input_compression\") == inputData[i]['parameter value'];", + " break;", + " case \"compression_buffer\":", + " tests[\"Body contains added input_compression_buffer\"] = postman.getEnvironmentVariable(\"input_compression_buffer\") == inputData[i]['parameter value'];", + " break;", + " case \"compression_level\":", + " tests[\"Body contains added input_compression_level\"] = postman.getEnvironmentVariable(\"input_compression_level\") == inputData[i]['parameter value'];", + " break;", + " case \"host\":", + " tests[\"Body contains added input_host\"] = postman.getEnvironmentVariable(\"input_host\") == inputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added input_name\"] = postman.getEnvironmentVariable(\"input_name_ipv4\") == inputData[i]['parameter value'];", + " break;", + " case \"one_peer_retention_mode\":", + " tests[\"Body contains added input_one_peer_retention_mode\"] = postman.getEnvironmentVariable(\"input_one_peer_retention_mode\") == inputData[i]['parameter value'];", + " break;", + " case \"port\":", + " tests[\"Body contains added port\"] = postman.getEnvironmentVariable(\"input_port\") == inputData[i]['parameter value'];", + " break;", + " case \"private_key\":", + " tests[\"Body contains added input_private_key\"] = postman.getEnvironmentVariable(\"input_private_key\") == inputData[i]['parameter value'];", + " break;", + " case \"protocol\":", + " tests[\"Body contains added input_protocol\"] = postman.getEnvironmentVariable(\"input_protocol\") == inputData[i]['parameter value'];", + " break;", + " case \"public_cert\":", + " tests[\"Body contains added input_public_cert\"] = postman.getEnvironmentVariable(\"input_public_cert\") == inputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added input_retry_interval\"] = postman.getEnvironmentVariable(\"input_retry_interval\") == inputData[i]['parameter value'];", + " break;", + " case \"tls\":", + " tests[\"Body contains added input_tls\"] = postman.getEnvironmentVariable(\"input_tls\") == intputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body containts added input_type\"] = \"ipv4\" == inputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addinput ipv6", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_name_ipv6}};ipv6;1\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get input_key ipv6", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var inputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of inputs\"] = inputData;", + " var i = 0;", + " while (i < inputData.length) {", + " if (postman.getEnvironmentVariable(\"input_name_ipv6\") == inputData[i].name) {", + " postman.setEnvironmentVariable(\"input_ipv6_id\",inputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == inputData.length){", + " tests[\"input_name_ipv6 was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};buffering_timeout;{{input_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};compression;{{input_compression}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression_buffer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};compression_buffer;{{input_compression_buffer}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression_level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};compression_level;{{input_compression_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};retry_interval;{{input_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};category;{{input_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput ca_certificate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};ca_certificate;{{input_ca_certificate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput host", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};host;{{input_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput one_peer_retention_mode", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};one_peer_retention_mode;{{input_one_peer_retention_mode}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};port;{{input_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput private_key", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};private_key;{{input_private_key}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput protocol", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};protocol;{{input_protocol}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput public_cert", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};public_cert;{{input_public_cert}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput tls", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};tls;{{input_tls}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getinput ipv6", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var inputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of inputs\"] = inputData;", + " for (var i = 0; i < inputData.length; i++) {", + " switch (inputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added input_buffering_timeout\"] = postman.getEnvironmentVariable(\"input_buffering_timeout\") == inputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added input_category\"] = postman.getEnvironmentVariable(\"input_category\") == inputData[i]['parameter value'];", + " break;", + " case \"ca_certificate\":", + " tests[\"Body contains added input_ca_certificate\"] = postman.getEnvironmentVariable(\"input_ca_certificate\") == inputData[i]['parameter value'];", + " break;", + " case \"compression\":", + " tests[\"Body contains added input_compression\"] = postman.getEnvironmentVariable(\"input_compression\") == inputData[i]['parameter value'];", + " break;", + " case \"compression_buffer\":", + " tests[\"Body contains added input_compression_buffer\"] = postman.getEnvironmentVariable(\"input_compression_buffer\") == inputData[i]['parameter value'];", + " break;", + " case \"compression_level\":", + " tests[\"Body contains added input_compression_level\"] = postman.getEnvironmentVariable(\"input_compression_level\") == inputData[i]['parameter value'];", + " break;", + " case \"host\":", + " tests[\"Body contains added input_host\"] = postman.getEnvironmentVariable(\"input_host\") == inputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added input_name\"] = postman.getEnvironmentVariable(\"input_name_ipv6\") == inputData[i]['parameter value'];", + " break;", + " case \"one_peer_retention_mode\":", + " tests[\"Body contains added input_one_peer_retention_mode\"] = postman.getEnvironmentVariable(\"input_one_peer_retention_mode\") == inputData[i]['parameter value'];", + " break;", + " case \"port\":", + " tests[\"Body contains added port\"] = postman.getEnvironmentVariable(\"input_port\") == inputData[i]['parameter value'];", + " break;", + " case \"private_key\":", + " tests[\"Body contains added input_private_key\"] = postman.getEnvironmentVariable(\"input_private_key\") == inputData[i]['parameter value'];", + " break;", + " case \"protocol\":", + " tests[\"Body contains added input_protocol\"] = postman.getEnvironmentVariable(\"input_protocol\") == inputData[i]['parameter value'];", + " break;", + " case \"public_cert\":", + " tests[\"Body contains added input_public_cert\"] = postman.getEnvironmentVariable(\"input_public_cert\") == inputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added input_retry_interval\"] = postman.getEnvironmentVariable(\"input_retry_interval\") == inputData[i]['parameter value'];", + " break;", + " case \"tls\":", + " tests[\"Body contains added input_tls\"] = postman.getEnvironmentVariable(\"input_tls\") == intputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body containts added input_type\"] = \"ipv6\" == inputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addinput file", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_name_file}};file;1\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get input_key file", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var inputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of inputs\"] = inputData;", + " var i = 0;", + " while (i < inputData.length) {", + " if (postman.getEnvironmentVariable(\"input_name_file\") == inputData[i].name) {", + " postman.setEnvironmentVariable(\"input_file_id\",inputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == inputData.length){", + " tests[\"input_name_file was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};buffering_timeout;{{input_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};compression;{{input_compression}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression_buffer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};compression_buffer;{{input_compression_buffer}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression_level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};compression_level;{{input_compression_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};retry_interval;{{input_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput protocol", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};protocol;{{input_protocol}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput max_size", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};max_size;{{input_max_size}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};path;{{input_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getinput file", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var inputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of inputs\"] = inputData;", + " for (var i = 0; i < inputData.length; i++) {", + " switch (inputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added input_buffering_timeout\"] = postman.getEnvironmentVariable(\"input_buffering_timeout\") == inputData[i]['parameter value'];", + " break;", + " case \"compression\":", + " tests[\"Body contains added input_compression\"] = postman.getEnvironmentVariable(\"input_compression\") == inputData[i]['parameter value'];", + " break;", + " case \"compression_buffer\":", + " tests[\"Body contains added input_compression_buffer\"] = postman.getEnvironmentVariable(\"input_compression_buffer\") == inputData[i]['parameter value'];", + " break;", + " case \"compression_level\":", + " tests[\"Body contains added input_compression_level\"] = postman.getEnvironmentVariable(\"input_compression_level\") == inputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added input_name\"] = postman.getEnvironmentVariable(\"input_name_file\") == inputData[i]['parameter value'];", + " break;", + " case \"protocol\":", + " tests[\"Body contains added input_protocol\"] = postman.getEnvironmentVariable(\"input_protocol\") == inputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added input_retry_interval\"] = postman.getEnvironmentVariable(\"input_retry_interval\") == inputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added input_type\"] = \"file\" == inputData[i]['parameter value'];", + " break;", + " case \"max_size\":", + " tests[\"Body contains added input_max_size\"] = postman.getEnvironmentVariable(\"input_max_size\") == inputData[i]['parameter value'];", + " break;", + " case \"path\":", + " tests[\"Body contains added input_path\"] = postman.getEnvironmentVariable(\"input_path\") == inputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addlogger file", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};logger_file_test;file;2\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get logger_key file", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " var i = 0;", + " while (i < loggerData.length) {", + " if (\"logger_file_test\" == loggerData[i].name) {", + " postman.setEnvironmentVariable(\"logger_file_id\",loggerData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == loggerData.length){", + " tests[\"logger_file_test was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger config", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};config;{{logger_config}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger debug", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};debug;{{logger_debug}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger error", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};error;{{logger_error}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};info;{{logger_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};level;{{logger_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger max_size", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};max_size;{{logger_max_size}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};name;{{logger_name_file}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getlogger file", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " for (var i = 0; i < loggerData.length; i++) {", + " switch (loggerData[i]['parameter key'])", + " {", + " case \"config\":", + " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", + " break;", + " case \"debug\":", + " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", + " break;", + " case \"error\":", + " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", + " break;", + " case \"info\":", + " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_file\") == loggerData[i]['parameter value'];", + " break;", + " case \"level\":", + " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added logger_type\"] = \"file\" == loggerData[i]['parameter value'];", + " break;", + " case \"max_size\":", + " tests[\"Body contains added logger_max_size\"] = postman.getEnvironmentVariable(\"logger_max_size\") == loggerData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addlogger standard", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};logger_standard_test;standard;2\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get logger_key standard", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " var i = 0;", + " while (i < loggerData.length) {", + " if (\"logger_standard_test\" == loggerData[i].name) {", + " postman.setEnvironmentVariable(\"logger_standard_id\",loggerData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == loggerData.length){", + " tests[\"logger_standard_test was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger config", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};config;{{logger_config}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger debug", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};debug;{{logger_debug}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger error", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};error;{{logger_error}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};info;{{logger_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};level;{{logger_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};name;{{logger_name_standard}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getlogger standard", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " for (var i = 0; i < loggerData.length; i++) {", + " switch (loggerData[i]['parameter key'])", + " {", + " case \"config\":", + " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", + " break;", + " case \"debug\":", + " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", + " break;", + " case \"error\":", + " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", + " break;", + " case \"info\":", + " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_standard\") == loggerData[i]['parameter value'];", + " break;", + " case \"level\":", + " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added logger_type\"] = \"standard\" == loggerData[i]['parameter value'];", + " break;", + " case \"max_size\":", + " tests[\"Body contains added logger_max_size\"] = postman.getEnvironmentVariable(\"logger_max_size\") == loggerData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addlogger syslog", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_name_syslog}};syslog;2\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get logger_key syslog", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " var i = 0;", + " while (i < loggerData.length) {", + " if (postman.getEnvironmentVariable(\"logger_name_syslog\") == loggerData[i].name) {", + " postman.setEnvironmentVariable(\"logger_syslog_id\",loggerData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == loggerData.length){", + " tests[\"logger_name_syslog was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger config", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};config;{{logger_config}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger debug", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};debug;{{logger_debug}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger error", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};error;{{logger_error}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};info;{{logger_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};level;{{logger_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getlogger syslog", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " for (var i = 0; i < loggerData.length; i++) {", + " switch (loggerData[i]['parameter key'])", + " {", + " case \"config\":", + " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", + " break;", + " case \"debug\":", + " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", + " break;", + " case \"error\":", + " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", + " break;", + " case \"info\":", + " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_syslog\") == loggerData[i]['parameter value'];", + " break;", + " case \"level\":", + " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added logger_type\"] = \"syslog\" == loggerData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addlogger monitoring", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};logger_monitoring_test;monitoring;2\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get logger_key monitoring", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " var i = 0;", + " while (i < loggerData.length) {", + " if (\"logger_monitoring_test\" == loggerData[i].name) {", + " postman.setEnvironmentVariable(\"logger_monitoring_id\",loggerData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == loggerData.length){", + " tests[\"logger_monitoring_test was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger config", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};config;{{logger_config}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger debug", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};debug;{{logger_debug}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger error", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};error;{{logger_error}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};info;{{logger_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};level;{{logger_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};name;{{logger_name_monitoring}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getlogger monitoring", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " for (var i = 0; i < loggerData.length; i++) {", + " switch (loggerData[i]['parameter key'])", + " {", + " case \"config\":", + " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", + " break;", + " case \"debug\":", + " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", + " break;", + " case \"error\":", + " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", + " break;", + " case \"info\":", + " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_monitoring\") == loggerData[i]['parameter value'];", + " break;", + " case \"level\":", + " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added logger_type\"] = \"monitoring\" == loggerData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addoutput ipv4", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_ipv4}};ipv4;4\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get output_key ipv4", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " var i = 0;", + " while (i < outputData.length) {", + " if (postman.getEnvironmentVariable(\"output_name_ipv4\") == outputData[i].name) {", + " postman.setEnvironmentVariable(\"output_ipv4_id\",outputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == outputData.length){", + " tests[\"output_name_ipv4 was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};compression;{{output_compression}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression_buffer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};compression_buffer;{{output_compression_buffer}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression_level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};compression_level;{{output_compression_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput failover", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};failover;{{output_failover}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};retry_interval;{{output_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};category;{{output_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput ca_certificate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};ca_certificate;{{output_ca_certificate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput host", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};host;{{output_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput one_peer_retention_mode", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};one_peer_retention_mode;{{output_one_peer_retention_mode}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};port;{{output_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput private_key", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};private_key;{{output_private_key}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput protocol", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};protocol;{{output_protocol}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput public_cert", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};public_cert;{{output_public_cert}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput tls", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};tls;{{output_tls}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getoutput ipv4", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " for (var i = 0; i < outputData.length; i++) {", + " switch (outputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", + " break;", + " case \"ca_certificate\":", + " tests[\"Body contains added output_ca_certificate\"] = postman.getEnvironmentVariable(\"output_ca_certificate\") == outputData[i]['parameter value'];", + " break;", + " case \"compression\":", + " tests[\"Body contains added output_compression\"] = postman.getEnvironmentVariable(\"output_compression\") == outputData[i]['parameter value'];", + " break;", + " case \"compression_buffer\":", + " tests[\"Body contains added output_compression_buffer\"] = postman.getEnvironmentVariable(\"output_compression_buffer\") == outputData[i]['parameter value'];", + " break;", + " case \"compression_level\":", + " tests[\"Body contains added output_compression_level\"] = postman.getEnvironmentVariable(\"output_compression_level\") == outputData[i]['parameter value'];", + " break;", + " case \"failover\":", + " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", + " break;", + " case \"host\":", + " tests[\"Body contains added output_host\"] = postman.getEnvironmentVariable(\"output_host\") == outputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_ipv4\") == outputData[i]['parameter value'];", + " break;", + " case \"one_peer_retention_mode\":", + " tests[\"Body contains added output_one_peer_retention\"] = postman.getEnvironmentVariable(\"output_one_peer_retention_mode\") == outputData[i]['parameter value'];", + " break;", + " case \"port\":", + " tests[\"Body contains added output_port\"] = postman.getEnvironmentVariable(\"output_port\") == outputData[i]['parameter value'];", + " break;", + " case \"private_key\":", + " tests[\"Body contains added output_private_key\"] = postman.getEnvironmentVariable(\"output_private_key\") == outputData[i]['parameter value'];", + " break;", + " case \"protocol\":", + " tests[\"Body contains added output_protocol\"] = postman.getEnvironmentVariable(\"output_protocol\") == outputData[i]['parameter value'];", + " break;", + " case \"public_cert\":", + " tests[\"Body contains added output_public_cert\"] = postman.getEnvironmentVariable(\"output_public_cert\") == outputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"tls\":", + " tests[\"Body contains added output_tls\"] = postman.getEnvironmentVariable(\"output_tls\") == outputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added output_type\"] = \"ipv4\" == outputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addoutput ipv6", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_ipv6}};ipv6;4\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get output_key ipv6", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " var i = 0;", + " while (i < outputData.length) {", + " if (postman.getEnvironmentVariable(\"output_name_ipv6\") == outputData[i].name) {", + " postman.setEnvironmentVariable(\"output_ipv6_id\",outputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == outputData.length){", + " tests[\"output_name_ipv6 was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};compression;{{output_compression}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression_buffer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};compression_buffer;{{output_compression_buffer}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression_level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};compression_level;{{output_compression_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput failover", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};failover;{{output_failover}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};retry_interval;{{output_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};category;{{output_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput ca_certificate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};ca_certificate;{{output_ca_certificate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput host", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};host;{{output_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput one_peer_retention_mode", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};one_peer_retention_mode;{{output_one_peer_retention_mode}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};port;{{output_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput private_key", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};private_key;{{output_private_key}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput protocol", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};protocol;{{output_protocol}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput public_cert", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};public_cert;{{output_public_cert}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput tls", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};tls;{{output_tls}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getoutput ipv6", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " for (var i = 0; i < outputData.length; i++) {", + " switch (outputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", + " break;", + " case \"ca_certificate\":", + " tests[\"Body contains added output_ca_certificate\"] = postman.getEnvironmentVariable(\"output_ca_certificate\") == outputData[i]['parameter value'];", + " break;", + " case \"compression\":", + " tests[\"Body contains added output_compression\"] = postman.getEnvironmentVariable(\"output_compression\") == outputData[i]['parameter value'];", + " break;", + " case \"compression_buffer\":", + " tests[\"Body contains added output_compression_buffer\"] = postman.getEnvironmentVariable(\"output_compression_buffer\") == outputData[i]['parameter value'];", + " break;", + " case \"compression_level\":", + " tests[\"Body contains added output_compression_level\"] = postman.getEnvironmentVariable(\"output_compression_level\") == outputData[i]['parameter value'];", + " break;", + " case \"failover\":", + " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", + " break;", + " case \"host\":", + " tests[\"Body contains added output_host\"] = postman.getEnvironmentVariable(\"output_host\") == outputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_ipv6\") == outputData[i]['parameter value'];", + " break;", + " case \"one_peer_retention_mode\":", + " tests[\"Body contains added output_one_peer_retention\"] = postman.getEnvironmentVariable(\"output_one_peer_retention_mode\") == outputData[i]['parameter value'];", + " break;", + " case \"port\":", + " tests[\"Body contains added output_port\"] = postman.getEnvironmentVariable(\"output_port\") == outputData[i]['parameter value'];", + " break;", + " case \"private_key\":", + " tests[\"Body contains added output_private_key\"] = postman.getEnvironmentVariable(\"output_private_key\") == outputData[i]['parameter value'];", + " break;", + " case \"protocol\":", + " tests[\"Body contains added output_protocol\"] = postman.getEnvironmentVariable(\"output_protocol\") == outputData[i]['parameter value'];", + " break;", + " case \"public_cert\":", + " tests[\"Body contains added output_public_cert\"] = postman.getEnvironmentVariable(\"output_public_cert\") == outputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"tls\":", + " tests[\"Body contains added output_tls\"] = postman.getEnvironmentVariable(\"output_tls\") == outputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added output_type\"] = \"ipv6\" == outputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addoutput file", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_file}};file;4\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get output_key file", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " var i = 0;", + " while (i < outputData.length) {", + " if (postman.getEnvironmentVariable(\"output_name_file\") == outputData[i].name) {", + " postman.setEnvironmentVariable(\"output_file_id\",outputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == outputData.length){", + " tests[\"output_name_file was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};category;{{output_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};compression;{{output_compression}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression_buffer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};compression_buffer;{{output_compression_buffer}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression_level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};compression_level;{{output_compression_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput failover", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};failover;{{output_failover}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};retry_interval;{{output_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput protocol", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};protocol;{{output_protocol}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput max_size", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};max_size;{{output_max_size}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};path;{{output_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getoutput file", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " for (var i = 0; i < outputData.length; i++) {", + " switch (outputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", + " break;", + " case \"compression\":", + " tests[\"Body contains added output_compression\"] = postman.getEnvironmentVariable(\"output_compression\") == outputData[i]['parameter value'];", + " break;", + " case \"compression_buffer\":", + " tests[\"Body contains added output_compression_buffer\"] = postman.getEnvironmentVariable(\"output_compression_buffer\") == outputData[i]['parameter value'];", + " break;", + " case \"compression_level\":", + " tests[\"Body contains added output_compression_level\"] = postman.getEnvironmentVariable(\"output_compression_level\") == outputData[i]['parameter value'];", + " break;", + " case \"max_size\":", + " tests[\"Body contains added output_max_size\"] = postman.getEnvironmentVariable(\"output_max_size\") == outputData[i]['parameter value'];", + " break;", + " case \"failover\":", + " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_file\") == outputData[i]['parameter value'];", + " break;", + " case \"path\":", + " tests[\"Body contains added output_path\"] = postman.getEnvironmentVariable(\"output_path\") == outputData[i]['parameter value'];", + " break;", + " case \"protocol\":", + " tests[\"Body contains added output_protocol\"] = postman.getEnvironmentVariable(\"output_protocol\") == outputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added output_type\"] = \"file\" == outputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addoutput rrd", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_rrd}};rrd;4\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get output_key rrd", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " var i = 0;", + " while (i < outputData.length) {", + " if (postman.getEnvironmentVariable(\"output_name_rrd\") == outputData[i].name) {", + " postman.setEnvironmentVariable(\"output_rrd_id\",outputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == outputData.length){", + " tests[\"output_name_rrd was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};category;{{output_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput failover", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};failover;{{output_failover}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};retry_interval;{{output_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};port;{{output_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};path;{{output_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput metrics_path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};metrics_path;{{output_metrics_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput status_path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};status_path;{{output_status_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput write_metrics", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};write_metrics;{{output_write_metrics}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput write_status", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};write_status;{{output_write_status}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getoutput rrd", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " for (var i = 0; i < outputData.length; i++) {", + " switch (outputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", + " break;", + " case \"failover\":", + " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", + " break;", + " case \"metrics_path\":", + " tests[\"Body contains added output_metrics_path\"] = postman.getEnvironmentVariable(\"output_metrics_path\") == outputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_rrd\") == outputData[i]['parameter value'];", + " break;", + " case \"path\":", + " tests[\"Body contains added output_path\"] = postman.getEnvironmentVariable(\"output_path\") == outputData[i]['parameter value'];", + " break;", + " case \"port\":", + " tests[\"Body contains added output_port\"] = postman.getEnvironmentVariable(\"output_port\") == outputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"status_path\":", + " tests[\"Body contains added output_status_path\"] = postman.getEnvironmentVariable(\"output_status_path\") == outputData[i]['parameter value'];", + " break;", + " case \"store_in_data\":", + " tests[\"Body contains added output_store_in_data\"] = postman.getEnvironmentVariable(\"output_store_in_data_bin\") == outputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added output_type\"] = \"rrd\" == outputData[i]['parameter value'];", + " break;", + " case \"write_metrics\":", + " tests[\"Body contains added output_write_metrics\"] = postman.getEnvironmentVariable(\"output_write_status\") == outputData[i]['parameter value'];", + " break;", + " case \"write_status\":", + " tests[\"Body contains added output_write_status\"] = postman.getEnvironmentVariable(\"output_write_status\") == outputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addoutput storage", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_storage}};storage;4\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get output_key storage", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " var i = 0;", + " while (i < outputData.length) {", + " if (postman.getEnvironmentVariable(\"output_name_storage\") == outputData[i].name) {", + " postman.setEnvironmentVariable(\"output_storage_id\",outputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == outputData.length){", + " tests[\"output_name_storage was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};category;{{output_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput failover", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};failover;{{output_failover}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};retry_interval;{{output_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput check_replication", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};check_replication;{{output_check_replication}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput store_in_data_bin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};store_in_data_bin;{{output_store_in_data_bin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_host", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_host;{{output_db_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_name;{{output_db_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_password", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_password;{{output_db_password}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_port;{{output_db_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_type", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_type;{{output_db_type}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_user", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_user;{{output_db_user}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};interval;{{output_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput length", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};length;{{output_length}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput queries_per_transaction", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};queries_per_transaction;{{output_queries_per_transaction}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput read_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};read_timeout;{{output_read_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput rebuild_check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};rebuild_check_interval;{{output_rebuild_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getoutput storage", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " for (var i = 0; i < outputData.length; i++) {", + " switch (outputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", + " break;", + " case \"check_replication\":", + " tests[\"Body contains added output_check_replication\"] = postman.getEnvironmentVariable(\"output_check_replication\") == outputData[i]['parameter value'];", + " break;", + " case \"db_host\":", + " tests[\"Body contains added output_db_host\"] = postman.getEnvironmentVariable(\"output_db_host\") == outputData[i]['parameter value'];", + " break;", + " case \"db_name\":", + " tests[\"Body contains added output_db_name\"] = postman.getEnvironmentVariable(\"output_db_name\") == outputData[i]['parameter value'];", + " break;", + " case \"db_password\":", + " tests[\"Body contains added output_db_password\"] = postman.getEnvironmentVariable(\"output_db_password\") == outputData[i]['parameter value'];", + " break;", + " case \"db_port\":", + " tests[\"Body contains added output_db_port\"] = postman.getEnvironmentVariable(\"output_db_port\") == outputData[i]['parameter value'];", + " break;", + " case \"db_type\":", + " tests[\"Body contains added output_db_type\"] = postman.getEnvironmentVariable(\"output_db_type\") == outputData[i]['parameter value'];", + " break;", + " case \"db_user\":", + " tests[\"Body contains added output_db_user\"] = postman.getEnvironmentVariable(\"output_db_user\") == outputData[i]['parameter value'];", + " break;", + " case \"failover\":", + " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", + " break;", + " case \"interval\":", + " tests[\"Body contains added output_interval\"] = postman.getEnvironmentVariable(\"output_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_storage\") == outputData[i]['parameter value'];", + " break;", + " case \"queries_per_transaction\":", + " tests[\"Body contains added output_queries_per_transaction\"] =postman.getEnvironmentVariable(\"output_queries_per_transaction\") == outputData[i]['parameter value'];", + " break;", + " case \"read_timeout\":", + " tests[\"Body contains added output_read_timeout\"] = postman.getEnvironmentVariable(\"output_read_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"rebuild_check_interval\":", + " tests[\"Body contains added output_rebuild_check_interval\"] = postman.getEnvironmentVariable(\"output_rebuild_check_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"store_in_data_bin\":", + " tests[\"Body contains added output_store_in_data_bin\"] = postman.getEnvironmentVariable(\"output_store_in_data_bin\") == outputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added output_type\"] = \"storage\" == outputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addoutput sql", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_sql}};sql;4\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get output_key sql", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " var i = 0;", + " while (i < outputData.length) {", + " if (postman.getEnvironmentVariable(\"output_name_sql\") == outputData[i].name) {", + " postman.setEnvironmentVariable(\"output_sql_id\",outputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == outputData.length){", + " tests[\"output_name_sql was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};category;{{output_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput failover", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};failover;{{output_failover}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};retry_interval;{{output_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput check_replication", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};check_replication;{{output_check_replication}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput cleanup_check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};cleanup_check_interval;{{output_cleanup_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_host", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_host;{{output_db_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_name;{{output_db_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_password", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_password;{{output_db_password}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_port;{{output_db_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_type", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_type;{{output_db_type}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_user", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_user;{{output_db_user}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput instance_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};instance_timeout;{{output_instance_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput queries_per_transaction", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};queries_per_transaction;{{output_queries_per_transaction}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput read_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};read_timeout;{{output_read_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getoutput sql", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " for (var i = 0; i < outputData.length; i++) {", + " switch (outputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", + " break;", + " case \"check_replication\":", + " tests[\"Body contains added output_check_replication\"] = postman.getEnvironmentVariable(\"output_check_replication\") == outputData[i]['parameter value'];", + " break;", + " case \"cleanup_check_interval\":", + " tests[\"Body contains added output_cleanup_check_interval\"] = postman.getEnvironmentVariable(\"output_cleanup_check_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"db_host\":", + " tests[\"Body contains added output_db_host\"] = postman.getEnvironmentVariable(\"output_db_host\") == outputData[i]['parameter value'];", + " break;", + " case \"db_name\":", + " tests[\"Body contains added output_db_name\"] = postman.getEnvironmentVariable(\"output_db_name\") == outputData[i]['parameter value'];", + " break;", + " case \"db_password\":", + " tests[\"Body contains added output_db_password\"] = postman.getEnvironmentVariable(\"output_db_password\") == outputData[i]['parameter value'];", + " break;", + " case \"db_port\":", + " tests[\"Body contains added output_db_port\"] = postman.getEnvironmentVariable(\"output_db_port\") == outputData[i]['parameter value'];", + " break;", + " case \"db_type\":", + " tests[\"Body contains added output_db_type\"] = postman.getEnvironmentVariable(\"output_db_type\") == outputData[i]['parameter value'];", + " break;", + " case \"db_user\":", + " tests[\"Body contains added output_db_user\"] = postman.getEnvironmentVariable(\"output_db_user\") == outputData[i]['parameter value'];", + " break;", + " case \"failover\":", + " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", + " break;", + " case \"instance_timeout\":", + " tests[\"Body contains added output_instance_timeout\"] = postman.getEnvironmentVariable(\"output_instance_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_sql\") == outputData[i]['parameter value'];", + " break;", + " case \"queries_per_transaction\":", + " tests[\"Body contains added output_queries_per_transaction\"] =postman.getEnvironmentVariable(\"output_queries_per_transaction\") == outputData[i]['parameter value'];", + " break;", + " case \"read_timeout\":", + " tests[\"Body contains added output_read_timeout\"] = postman.getEnvironmentVariable(\"output_read_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added output_type\"] = \"sql\" == outputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gettypelist", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"gettypelist\",\n \"object\": \"centbrokercfg\",\n \"values\": \"output\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getfieldlist", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getfieldlist\",\n \"object\": \"centbrokercfg\",\n \"values\": \"ipv4\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "10-Timeperiods", + "description": "", + "item": [ + { + "name": "Add tp", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"tp\",\n \"values\": \"test_name;test_alias\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"test_name;name;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};alias;{{tp_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam sunday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam monday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam tuesday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam wednesday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam thursday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam friday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam include", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};include;{{tp_include}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam exclude", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};exclude;{{tp_exclude}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List timeperiod", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var tpData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of time periods\"] = tpData;", + " var i = 0;", + " while (i < tpData.length) {", + " if (postman.getEnvironmentVariable(\"tp_name\") == tpData[i].name) {", + " tests[\"Body contains added name\"] = postman.getEnvironmentVariable(\"tp_name\") == tpData[i].name;", + " tests[\"Body contains added alias\"] = postman.getEnvironmentVariable(\"tp_alias\") == tpData[i].alias;", + " tests[\"Body contains added sunday\"] = postman.getEnvironmentVariable(\"tp_sunday\") == tpData[i].sunday;", + " tests[\"Body contains added monday\"] = postman.getEnvironmentVariable(\"tp_monday\") == tpData[i].monday;", + " tests[\"Body contains added tuesday\"] = postman.getEnvironmentVariable(\"tp_tuesday\") == tpData[i].tuesday;", + " tests[\"Body contains added wednesday\"] = postman.getEnvironmentVariable(\"tp_wednesday\") == tpData[i].wednesday;", + " tests[\"Body contains added thursday\"] = postman.getEnvironmentVariable(\"tp_thursday\") == tpData[i].thursday;", + " tests[\"Body contains added friday\"] = postman.getEnvironmentVariable(\"tp_friday\") == tpData[i].friday;", + " tests[\"Body contains added saturday\"] = postman.getEnvironmentVariable(\"tp_saturday\") == tpData[i].saturday;", + " break;", + " }", + " i++;", + " }", + " if (i == tpData.length)", + " tests[\"tp_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"tp\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Set exception", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setexception\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}};{{exception_day}};{{exception_timerange}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get exceptions", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var exceptionData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of exceptions\"] = exceptionData;", + " var i = 0;", + " while (i < exceptionData.length) {", + " if (postman.getEnvironmentVariable(\"exception_day\") == exceptionData[i].days) {", + " tests[\"Body contains added exception day\"] = postman.getEnvironmentVariable(\"exception_day\") == exceptionData[i].days;", + " tests[\"Body contains added exception timerange\"] = postman.getEnvironmentVariable(\"exception_timerange\") == exceptionData[i].timerange;", + " break;", + " }", + " i++;", + " }", + " if (i == tpData.length)", + " tests[\"tp_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getexception\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del exception", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delexception\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}};{{exception_day}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "11-Commands", + "description": "Tests all commands to manage commands.", + "item": [ + { + "name": "Add 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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"cmd\",\n \"values\": \"cmd-test;misc;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"cmd-test;name;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam line", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};line;{{command_line}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam type", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};type;{{command_type}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam graph", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};graph;{{command_graph}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam example", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};example;{{command_example}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};comment;{{command_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List commands", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var commandData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of commands\"] = commandData;", + " var i = 0;", + " while (i < commandData.length) {", + " if (postman.getEnvironmentVariable(\"command_name\") == commandData[i].name) {", + " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == commandData[i].name;", + " tests[\"Body contains added command_type\"] = postman.getEnvironmentVariable(\"command_type\") == commandData[i].type;", + " tests[\"Body contains added command_line\"] = postman.getEnvironmentVariable(\"command_line\") == commandData[i].line;", + " break;", + " }", + " i++;", + " }", + " if (i == commandData.length)", + " tests[\"command_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"cmd\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "20-Contacts templates", + "description": "Tests all commands to manage contact.", + "item": [ + { + "name": "Add ctpl", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"contacttpl\",\n \"values\": \"test_name;test_alias;test@localhost;pwd;0;0;en_US;Idap\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"test_alias;name;{{ctpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"test_alias;alias;{{ctpl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};comment;{{ctpl_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam hostnotifcmd", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};hostnotifcmd;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam svcnotifcmd", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};svcnotifcmd;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam hostnotifperiod", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};hostnotifperiod;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam svcnotifperiod", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};svcnotifperiod;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam hostnotifopt", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};hostnotifopt;{{contact_hostnotifopt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam svcnotifopt", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};servicenotifopt;{{contact_svcnotifopt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address1", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address1;{{contact_address1}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address2;{{contact_address2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address3", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address3;{{contact_address3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address4", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address4;{{contact_address4}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address5", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address5;{{contact_address5}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address6", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address6;{{contact_address6}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create ctpl2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_name2}};{{ctpl_alias2}};test@localhost;pwd;0;0;en_US;Idap\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam template", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};template;{{ctpl_alias2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Enable", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"enable\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Disable", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"disable\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "21-Contacts", + "description": "Tests all commands to manage contact.", + "item": [ + { + "name": "Add contact", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"contact\",\n \"values\": \"test_name;test_alias;test@localhost;pwd;0;0;en_US;Idap\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"test_alias;name;{{contact_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"test_alias;alias;{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};comment;{{contact_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam mail", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};email;{{contact_mail}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam password", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};password;{{contact_pwd}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};access;{{contact_access}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam language", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};language;{{contact_language}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam GUI access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};access;{{contact_GUI_access}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam admin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;{{contact_admin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam authtype", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};authtype;{{contact_authentication}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam hostnotifcmd", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifcmd;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam svcnotifcmd", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifcmd;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam hostnotifperiod", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifperiod;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam svcnotifperiod", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifperiod;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam hostnotifopt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam svcnotifopt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam address1", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address1;{{contact_address1}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address2;{{contact_address2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address3", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address3;{{contact_address3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address4", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address4;{{contact_address4}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address5", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address5;{{contact_address5}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address6", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address6;{{contact_address6}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_dn", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};ldap_dn;{{contact_ldap_dn}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam autologin_key", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};autologin_key;{{contact_autologin_key}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam template", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};template;{{ctpl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"enable\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Disable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"disable\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List contact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_name\") == contactData[i].name) {", + " tests[\"Body contains added contact_name\"] = postman.getEnvironmentVariable(\"contact_name\") == contactData[i].name;", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].alias;", + " tests[\"Body contains added contact_email\"] = postman.getEnvironmentVariable(\"contact_mail\") == contactData[i].email;", + " tests[\"Body contains added contact_GUI_access\"] = postman.getEnvironmentVariable(\"contact_GUI_access\") == contactData[i]['gui access'];", + " tests[\"Body contains added contact_admin\"] = postman.getEnvironmentVariable(\"contact_admin\") == contactData[i].admin;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"contact\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Set contact non admin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;0\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create contact-2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"contact\",\n \"values\": \"{{contact_name2}};{{contact_alias2}};test@localhost;pwd;0;0;en_US;Idap\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Set contact non admin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;0\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "22-Contactgroups", + "description": "Tests all commands to manage contact groups.", + "item": [ + { + "name": "Add contact group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"cg\",\n \"values\": \"test_name;test_alias\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cg\",\n \"values\": \"test_name;name;{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};alias;{{cg_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"enable\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Disable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"disable\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", + " {", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_alias was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;", + "" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List contact group", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name)", + " {", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " tests[\"Body contains added cg_alias\"] = postman.getEnvironmentVariable(\"cg_alias\") == cgData[i].alias;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"cg\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "30-Hosts_Templates", + "description": "", + "item": [ + { + "name": "Create host template2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name2}};{{htpl_name2}};0.0.0.0;;central;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add htpl", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"test_host;test_host;0.0.0.0;{{htpl_name2}};central;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"test_host;name;{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam 2d_coords", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};2d_coords;{{host_2d_coords}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam 3d_coords", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};3d_coords;{{host_3d_coords}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam action_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};action_url;{{host_action_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};activate;{{host_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam active_checks_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};active_checks_enabled;{{host_active_checks_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};address;{{host_address}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};alias;{{host_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List hosts", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hostData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of hosts\"] = hostData;", + " var i = 0;", + " while (i < hostData.length) {", + " if (postman.getEnvironmentVariable(\"htpl_name\") == hostData[i].name) {", + " tests[\"Body contains added host\"] = postman.getEnvironmentVariable(\"htpl_name\") == hostData[i].name;", + " tests[\"Body contains added host_alias\"] = postman.getEnvironmentVariable(\"host_alias\") == hostData[i].alias;", + " tests[\"Body contains added host_address\"] = postman.getEnvironmentVariable(\"host_address\") == hostData[i].address;", + " tests[\"Body contains added host_activate\"] = postman.getEnvironmentVariable(\"host_activate\") == hostData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == hostData.length)", + " tests[\"htpl_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"show\",\n \"object\":\"htpl\"\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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_command_arguments", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_command_arguments;{{command_example}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_interval;{{host_normal_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_freshness", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_freshness;{{host_check_freshness}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};checks_enabled;{{host_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam contact_additive_inheritance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};contact_additive_inheritance;{{host_contact_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cg_additive_inheritance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};cg_additive_inheritance;{{host_cg_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};event_handler;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_arg", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};event_handler_arguments;{{command_example}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};event_handler_enabled;{{host_event_handler_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam first_notification_delay", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};first_notification_delay;{{host_first_notif_delay}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam flap_detection_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};flap_detection_enabled;{{host_flap_detect_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam host_low_flap_threshold", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};host_low_flap_threshold;{{host_low_flap}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam host_high_flap_threshold", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};host_high_flap_threshold;{{host_high_flap}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam flap_detection_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};flap_detection_options;{{host_flap_detect_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};icon_image;{{host_icon_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image_alt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};icon_image_alt;{{host_icon_image_alt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam max_check_attempts", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam notes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notes;{{host_notes}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notes_url;{{host_notes_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notifications_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notifications_enabled;{{host_notif_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notification_interval;{{host_notif_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notification_options;{{host_notif_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notification_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam recovery_notif_delay", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};recovery_notification_delay;{{host_recovery_notif_delay}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam obsess_over_host", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};obsess_over_host;{{host_obsess_over_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam passive_checks_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};passive_checks_enabled;{{host_passive_checks_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam process_perf_data", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};process_perf_data;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_status_info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};retain_status_information;{{host_retain_status_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_nonstatus_info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};retain_nonstatus_information;{{host_retain_nonstatus_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retry_check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};retry_check_interval;{{host_retry_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam snmp_community", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam snmp_version", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": "Setparam stalking_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};stalking_options;{{host_stalking_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam statusmap_image", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};statusmap_image;{{host_statusmap_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam host_notif_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};host_notification_options;{{host_notification_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam timezone", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};timezone;{{host_timezone}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmacro", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setmacro\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{host_macro_name}};{{host_macro_value}};{{host_is_password}};{{host_macro_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmacro", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var macroData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of macros\"] = macroData;", + " var i = 0;", + " while (i < macroData.length) {", + " if (postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name']) {", + " tests[\"Body contains added macro\"] = postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name'];", + " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"host_macro_value\") == macroData[i]['macro value'];", + " tests[\"Body contains added macro_is_password\"] = postman.getEnvironmentVariable(\"host_is_password\") == macroData[i].is_password;", + " tests[\"Body contains added macro_description\"] = postman.getEnvironmentVariable(\"host_macro_description\") == macroData[i].description;", + " break;", + " }", + " i++;", + " }", + " if (i == macroData.length)", + " tests[\"host_macro_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getmacro\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmacro", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"delmacro\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{host_macro_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create host template3", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name3}};test_host;0.0.0.0;;central;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addtemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"addtemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deltemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"deltemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Settemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"settemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gettemplate", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var templateData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of templates\"] = templateData;", + " var i = 0;", + " while (i < templateData.length) {", + " if (postman.getEnvironmentVariable(\"htpl_name3\") == templateData[i].name) {", + " tests[\"Body contains added htpl_name3\"] = postman.getEnvironmentVariable(\"htpl_name3\") == templateData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == templateData.length)", + " tests[\"htpl_name3 was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"gettemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addparent\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delparent\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparent\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getparent", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var parentData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of parents\"] = parentData;", + " var i = 0;", + " while (i < parentData.length) {", + " if (postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name) {", + " tests[\"Body contains added host_name2\"] = postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == parentData.length)", + " tests[\"host_name2 was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getparent\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontactgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getcontactgroup\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_alias was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getcontact\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add host group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"test_name;test_alias\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"test_name;name;{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gethostgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = hgData;", + " var i = 0;", + " while (i < hgData.length) {", + " if (postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name) {", + " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == hgData.length)", + " tests[\"hg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"gethostgroup\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add host category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Set hc 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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setseverity", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Unsetseverity", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"enable\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Disable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"disable\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "31-Hosts", + "description": "Tests all commands to manage hosts", + "item": [ + { + "name": "Add host", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"test_host;test_host;0.0.0.0;{{htpl_name}};central;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"test_host;name;{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam 2d_coords", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};2d_coords;{{host_2d_coords}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam 3d_coords", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};3d_coords;{{host_3d_coords}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam action_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};action_url;{{host_action_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};activate;{{host_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam active_checks_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};active_checks_enabled;{{host_active_checks_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};address;{{host_address}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};alias;{{host_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List hosts", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hostData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of hosts\"] = hostData;", + " var i = 0;", + " while (i < hostData.length) {", + " if (postman.getEnvironmentVariable(\"host_name\") == hostData[i].name) {", + " tests[\"Body contains added host\"] = postman.getEnvironmentVariable(\"host_name\") == hostData[i].name;", + " tests[\"Body contains added host_alias\"] = postman.getEnvironmentVariable(\"host_alias\") == hostData[i].alias;", + " tests[\"Body contains added host_address\"] = postman.getEnvironmentVariable(\"host_address\") == hostData[i].address;", + " tests[\"Body contains added host_activate\"] = postman.getEnvironmentVariable(\"host_activate\") == hostData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == hostData.length)", + " tests[\"host_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"show\",\n \"object\":\"host\"\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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_command_arguments", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_command_arguments;{{command_example}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_interval;{{host_normal_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_freshness", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_freshness;{{host_check_freshness}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};checks_enabled;{{host_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam contact_additive_inheritance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};contact_additive_inheritance;{{host_contact_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cg_additive_inheritance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};cg_additive_inheritance;{{host_cg_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};event_handler;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_arg", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};event_handler_arguments;{{command_example}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};event_handler_enabled;{{host_event_handler_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam first_notification_delay", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};first_notification_delay;{{host_first_notif_delay}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam flap_detection_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};flap_detection_enabled;{{host_flap_detect_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam host_low_flap_threshold", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};host_low_flap_threshold;{{host_low_flap}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam host_high_flap_threshold", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};host_high_flap_threshold;{{host_high_flap}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam flap_detection_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};flap_detection_options;{{host_flap_detect_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};icon_image;{{host_icon_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image_alt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};icon_image_alt;{{host_icon_image_alt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam max_check_attempts", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};max_check_attempts;{{host_max_check_attempts}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notes;{{host_notes}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notes_url;{{host_notes_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notifications_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notifications_enabled;{{host_notif_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notification_interval;{{host_notif_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notification_options;{{host_notif_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notification_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam recovery_notif_delay", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};recovery_notification_delay;{{host_recovery_notif_delay}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam obsess_over_host", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};obsess_over_host;{{host_obsess_over_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam passive_checks_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};passive_checks_enabled;{{host_passive_checks_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam process_perf_data", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};process_perf_data;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_status_info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};retain_status_information;{{host_retain_status_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_nonstatus_info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};retain_nonstatus_information;{{host_retain_nonstatus_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retry_check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};retry_check_interval;{{host_retry_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam snmp_community", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};snmp_community;{{host_snmp_community}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam snmp_version", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};snmp_version;{{host_snmp_version}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam stalking_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};stalking_options;{{host_stalking_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam statusmap_image", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};statusmap_image;{{host_statusmap_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam host_notif_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};host_notification_options;{{host_notification_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam timezone", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};timezone;{{host_timezone}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinstance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setinstance\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmacro", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setmacro\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{host_macro_name}};{{host_macro_value}};{{host_is_password}};{{host_macro_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmacro", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var macroData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of macros\"] = macroData;", + " var i = 0;", + " while (i < macroData.length) {", + " if (postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name']) {", + " tests[\"Body contains added macro\"] = postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name'];", + " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"host_macro_value\") == macroData[i]['macro value'];", + " tests[\"Body contains added macro_is_password\"] = postman.getEnvironmentVariable(\"host_is_password\") == macroData[i].is_password;", + " tests[\"Body contains added macro_description\"] = postman.getEnvironmentVariable(\"host_macro_description\") == macroData[i].description;", + " break;", + " }", + " i++;", + " }", + " if (i == macroData.length)", + " tests[\"host_macro_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getmacro\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmacro", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"delmacro\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{host_macro_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addtemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"addtemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deltemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"deltemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Settemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"settemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gettemplate", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var templateData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of templates\"] = templateData;", + " var i = 0;", + " while (i < templateData.length) {", + " if (postman.getEnvironmentVariable(\"htpl_name\") == templateData[i].name) {", + " tests[\"Body contains added htpl_name\"] = postman.getEnvironmentVariable(\"htpl_name\") == templateData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == templateData.length)", + " tests[\"host_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"gettemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Applytpl", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"applytpl\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addparent\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delparent\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparent\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getparent", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var parentData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of parents\"] = parentData;", + " var i = 0;", + " while (i < parentData.length) {", + " if (postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name) {", + " tests[\"Body contains added parent\"] = postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == parentData.length)", + " tests[\"host_name2 was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getparent\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontactgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getcontactgroup\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_alias was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getcontact\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gethostgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = hgData;", + " var i = 0;", + " while (i < hgData.length) {", + " if (postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name) {", + " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == hgData.length)", + " tests[\"hg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"gethostgroup\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setseverity", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Unsetseverity", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"enable\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Disable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"disable\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "32-Hostgroups", + "description": "Tests all commands to manage host groups.", + "item": [ + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};alias;{{hg_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};comment;{{hg_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};activate;{{hg_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};notes;{{hg_notes}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};notes_url;{{hg_notes_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam action_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};action_url;{{hg_action_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};icon_image;{{hg_icon_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam map_icon_image", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};map_icon_image;{{hg_map_icon_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List host groups", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of host categories\"] = hgData;", + " var i = 0;", + " while (i < hgData.length) {", + " if (postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name)", + " {", + " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name;", + " tests[\"Body contains added hg_alias\"] = postman.getEnvironmentVariable(\"hg_alias\") == hgData[i].alias;", + " break;", + " }", + " i++;", + " }", + " if (i == hgData.length)", + " tests[\"hg_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"hg\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addmember", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmenber", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmember", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmember", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hg_member_Data = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of host group members\"] = hg_member_Data;", + " var i = 0;", + " while (i < hg_member_Data.length) {", + " if (postman.getEnvironmentVariable(\"host_name\") == hg_member_Data[i].name)", + " {", + " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == hg_member_Data[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == hg_member_Data.length)", + " tests[\"host_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "33-Hosts_Categories", + "description": "Tests all commands to manage host categories.", + "item": [ + { + "name": "Addmember", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmember", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmember", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{host_name}}|{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmember", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hc_member_Data = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of host category members\"] = hc_member_Data;", + " var i = 0;", + " while (i < hc_member_Data.length) {", + " if (postman.getEnvironmentVariable(\"host_name\") == hc_member_Data[i].name)", + " {", + " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == hc_member_Data[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == hc_member_Data.length)", + " {", + " tests[\"host_name was found\"] = false;", + " }", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Unsetseverity", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List host categories", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hcData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of host categories\"] = hcData;", + " var i = 0;", + " while (i < hcData.length) {", + " if (postman.getEnvironmentVariable(\"hc_name\") == hcData[i].name)", + " {", + " tests[\"Body contains added hc_name\"] = postman.getEnvironmentVariable(\"hc_name\") == hcData[i].name;", + " tests[\"Body contains added hc_alias\"] = postman.getEnvironmentVariable(\"hc_alias\") == hcData[i].alias;", + " break;", + " }", + " i++;", + " }", + " if (i == hcData.length)", + " tests[\"hc_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"hc\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "40-Services_Templates", + "description": "Tests all commands to manage service templates.", + "item": [ + { + "name": "Add service template", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"stpl\",\n \"values\": \"test_stpl;stpl_alias;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam description", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"test_stpl;description;{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};activate;{{stpl_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};alias;{{stpl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create service template-2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description2}};test_alias;{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam template", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};template;{{stpl_description2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam is_volatile", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};is_volatile;{{stpl_is_volatile}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_command_arguments", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_command_arguments;{{command_argument}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam max_check_attempts", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam normal_check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};normal_check_interval;{{stpl_normal_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retry_check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};retry_check_interval;{{stpl_retry_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam active_checks_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};active_checks_enabled;{{stpl_active_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam passive_checks_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};passive_checks_enabled;{{stpl_passive_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam contact_additive_inheritance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};contact_additive_inheritance;{{stpl_contact_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cg_additive_inheritance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};cg_additive_inheritance;{{stpl_cg_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notification_interval;{{stpl_notification_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notification_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notification_options;{{stpl_notif_option}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam first_notification_delay", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};first_notification_delay;{{stpl_first_notif_delay}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam parallelize_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};parallelize_check;{{stpl_parallelize_checks}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam obsess_over_service", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};obsess_over_service;{{stpl_obsess_over_service}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_freshness", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_freshness;{{stpl_check_freshness}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam freshness_threshold", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};freshness_threshold;{{stpl_freshness_threshold}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};event_handler_enabled;{{stpl_event_handler_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam flap_detection_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};flap_detection_enabled;{{stpl_flap_detection_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam process_perf_data", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};process_perf_data;{{stpl_process_perf_data}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_status_informations", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};retain_status_information;{{stpl_retain_status_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_nonstatus_informations", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};retain_nonstatus_information;{{stpl_retain_nonstatus_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam stalking_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};stalking_options;{{stpl_stalking_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};event_handler;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_arguments", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};event_handler_arguments;{{stpl_event_handler_arg}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notes;{{stpl_notes}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notes_url;{{stpl_notes_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam action_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};action_url;{{stpl_action_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};icon_image;{{stpl_icon_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image_alt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};icon_image_alt;{{stpl_icon_image_alt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam graphtemplate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};graphtemplate;{{stpl_graph_tpl}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};comment;{{stpl_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam service_notif_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};service_notification_options;{{stpl_notif_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List service templates", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var stplData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of service templates\"] = stplData;", + " var i = 0;", + " while (i < stplData.length) {", + " if (postman.getEnvironmentVariable(\"stpl_description\") == stplData[i].description)", + " {", + " tests[\"Body contains added service template\"] = postman.getEnvironmentVariable(\"stpl_description\") == stplData[i].description;", + " tests[\"Body contains added alias\"] = postman.getEnvironmentVariable(\"stpl_alias\") == stplData[i].alias;", + " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == stplData[i]['check command'];", + " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == stplData[i]['check command arg'];", + " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"stpl_normal_check_interval\") == stplData[i]['normal check interval'];", + " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"stpl_retry_check_interval\") == stplData[i]['retry check interval'];", + " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"stpl_max_check\") == stplData[i]['max check attempts'];", + " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"stpl_active_check_enabled\") == stplData[i]['active checks enabled'];", + " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"stpl_passive_check_enabled\") == stplData[i]['passive checks enabled'];", + " break;", + " }", + " i++;", + " }", + " if (i == stplData.length)", + " tests[\"stpl_description was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"stpl\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhosttemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhosttemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethosttemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}|{{htpl_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmacro", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{stpl_macro_name}};{{stpl_macro_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmacro", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var macroData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of macros\"] = macroData;", + " var i = 0;", + " while (i < macroData.length) {", + " if (postman.getEnvironmentVariable(\"stpl_macro_value\") == macroData[i]['macro value']){", + " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"stpl_macro_value\") == macroData[i]['macro value'];", + " break;", + " }", + " i++;", + " }", + " if (i == macroData.length)", + " tests[\"stpl_macro_value was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmacro", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delmacro\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{stpl_macro_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}|{{contact_alias2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name){", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_alias was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontactgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name){", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add trap", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"trap\",\n \"values\": \"test_name;test_OID\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"test_name;name;{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Settrap", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"settrap\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gettrap", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var trapData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of traps\"] = trapData;", + " var i = 0;", + " while (i < trapData.length) {", + " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name){", + " tests[\"Body contains added trap_name\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == trapData.length)", + " tests[\"trap_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"gettrap\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deltrap", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deltrap\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "41-Services", + "description": "Tests all commands to manage services.", + "item": [ + { + "name": "Add service", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};service_test;{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam description", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};service_test;description;{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};activate;{{service_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam template", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};template;{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam is_volatile", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};is_volatile;{{service_is_volatile}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};check_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_command_arguments", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};check_command_arguments;{{command_argument}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam max_check_attempts", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};max_check_attempts;{{service_max_check_attempts}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam normal_check_interval", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};normal_check_interval;{{service_normal_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retry_check_interval", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};retry_check_interval;{{service_retry_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam active_checks_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};active_checks_enabled;{{service_active_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam passive_checks_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};passive_checks_enabled;{{service_passive_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam contact_additive_inheritance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};contact_additive_inheritance;{{service_contact_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cg_additive_inheritance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};cg_additive_inheritance;{{service_cg_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notifications_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notifications_enabled;{{service_notifications_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam contact_additive_inheritance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};contact_additive_inheritance;{{service_contact_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cg_additive_inheritance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};cg_additive_inheritance;{{service_cg_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_interval", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notification_interval;{{service_notif_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notification_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_options", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notification_options;{{service_notif_option}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam first_notification_delay", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};first_notification_delay;{{service_first_notif_delay}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam parallelize_check", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};parallelize_check;{{service_parallelize_checks}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam obsess_over_service", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};obsess_over_service;{{service_obsess_over_service}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_freshness", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};check_freshness;{{service_check_freshness}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam freshness_threshold", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};freshness_threshold;{{service_freshness_threshold}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};event_handler_enabled;{{service_event_handler_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam flap_detection_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};flap_detection_enabled;{{service_flap_detection_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam service_low_flap_threshold", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};service_low_flap_threshold;{{service_low_flap}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam service_high_flap_threshold", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};service_high_flap_threshold;{{service_high_flap}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam process_perf_data", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};process_perf_data;{{service_process_perf_data}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_status_informations", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};retain_status_information;{{service_retain_status_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_nonstatus_informations", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};retain_nonstatus_information;{{service_retain_nonstatus_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};event_handler;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_arguments", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};event_handler_arguments;{{service_event_handler_arg}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notes;{{service_notes}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes_url", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notes_url;{{service_notes_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam action_url", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};action_url;{{service_action_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};icon_image;{{service_icon_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image_alt", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};icon_image_alt;{{service_icon_image_alt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};comment;{{service_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam service_notif_options", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};service_notification_options;{{service_notif_option}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List service", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of services\"] = serviceData;", + " var i = 0;", + " while (i < serviceData.length) {", + " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i].description)", + " {", + " tests[\"Body contains added service\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i].description;", + " tests[\"Body contains added host name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", + " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == serviceData[i]['check command'];", + " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == serviceData[i]['check command arg'];", + " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"service_normal_check_interval\") == serviceData[i]['normal check interval'];", + " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"service_retry_check_interval\") == serviceData[i]['retry check interval'];", + " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"service_max_check_attempts\") == serviceData[i]['max check attempts'];", + " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"service_active_check_enabled\") == serviceData[i]['active checks enabled'];", + " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"service_passive_check_enabled\") == serviceData[i]['passive checks enabled'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"service_host was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"service\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhost", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhost\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhost", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhost\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethost-2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethost\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethost", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethost\",\n \"object\": \"service\",\n \"values\": \"{{host_name2}};{{service_description}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmacro", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{service_macro_name}};{{service_macro_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmacro", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var macroData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of macros\"] = macroData;", + " var i = 0;", + " while (i < macroData.length) {", + " if (postman.getEnvironmentVariable(\"service_macro_name\") == macroData[i]['macro name'])", + " {", + " tests[\"Body contains added macro_name\"] = postman.getEnvironmentVariable(\"service_macro_name\") == macroData[i]['macro name'];", + " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"service_macro_value\") == macroData[i]['macro value'];", + " break;", + " }", + " i++;", + " }", + " if (i == macroData.length)", + " tests[\"service_macro_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmacro", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delmacro\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{service_macro_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add service categories", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"sc\",\n \"values\": \"sc_test;description_test\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sc\",\n \"values\": \"sc_test;name;{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setseverity", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Unsetseverity", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Resetseverity", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setseverity", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Unsetseverity", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of conctacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", + " {", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_alias was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontactgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of conctact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name){", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addtrap", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addtrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deltrap", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deltrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Settrap", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"settrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gettrap", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var trapData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of traps\"] = trapData;", + " var i = 0;", + " while (i < trapData.length) {", + " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name)", + " {", + " tests[\"Body contains added trap_name\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == trapData.length)", + " tests[\"trap_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"gettrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "42-Service_by_Hostgroups", + "description": "Tests all commands to manage services on host group.", + "item": [ + { + "name": "Add hgservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};hgservice_test;{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam description", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};hgservice_test;description;{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};activate;{{hgservice_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam template", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};template;{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam is_volatile", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};is_volatile;{{hgservice_is_volatile}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_command_arguments", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_command_arguments;{{command_argument}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam max_check_attempts", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};max_check_attempts;{{hgservice_max_check_attempts}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam normal_check_interval", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};normal_check_interval;{{hgservice_normal_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retry_check_interval", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retry_check_interval;{{hgservice_retry_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam active_checks_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};active_checks_enabled;{{hgservice_active_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam passive_checks_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};passive_checks_enabled;{{hgservice_passive_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam contact_additive_inheritance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};contact_additive_inheritance;{{hgservice_contact_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cg_additive_inheritance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};cg_additive_inheritance;{{hgservice_cg_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notifications_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notifications_enabled;{{hgservice_notifications_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_interval", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_interval;{{hgservice_notif_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_options", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_options;{{hgservice_notif_option}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam first_notification_delay", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};first_notification_delay;{{hgservice_first_notif_delay}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam parallelize_check", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};parallelize_check;{{hgservice_parallelize_checks}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam obsess_over_service", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};obsess_over_service;{{hgservice_obsess_over_service}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_freshness", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_freshness;{{hgservice_check_freshness}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam freshness_threshold", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};freshness_threshold;{{hgservice_freshness_threshold}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_enabled;{{hgservice_event_handler_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam flap_detection_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};flap_detection_enabled;{{hgservice_flap_detection_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam process_perf_data", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};process_perf_data;{{hgservice_process_perf_data}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_status_informations", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_status_information;{{hgservice_retain_status_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_nonstatus_informations", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_nonstatus_information;{{hgservice_retain_nonstatus_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_arguments", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_arguments;{{hgservice_event_handler_arg}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes;{{hgservice_notes}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes_url", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes_url;{{hgservice_notes_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam action_url", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};action_url;{{hgservice_action_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image;{{hgservice_icon_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image_alt", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image_alt;{{hgservice_icon_image_alt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};comment;{{hgservice_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam service_notif_options", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};service_notification_options;{{hg_notif_option}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List service", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of host group services\"] = serviceData;", + " var i = 0;", + " while (i < serviceData.length) {", + " if (postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description)", + " {", + " tests[\"Body contains added hgservice\"] = postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description;", + " tests[\"Body contains added hgservice_hg\"] = postman.getEnvironmentVariable(\"hg_name\") == serviceData[i]['hg name'];", + " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == serviceData[i]['check command'];", + " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == serviceData[i]['check command arg'];", + " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"hgservice_normal_check_interval\") == serviceData[i]['normal check interval'];", + " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"hgservice_retry_check_interval\") == serviceData[i]['retry check interval'];", + " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"hgservice_max_check_attempts\") == serviceData[i]['max check attempts'];", + " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_active_check_enabled\") == serviceData[i]['active checks enabled'];", + " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_passive_check_enabled\") == serviceData[i]['passive checks enabled'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"hgservice_description was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"hgservice\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create hg-2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name2}};{{hg_name2}};0.0.0.0;;central;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethostgroup-2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name2}};{{hgservice_description}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmacro", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hgservice_macro_name}};{{hgservice_macro_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmacro", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var macroData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of macros\"] = macroData;", + " var i = 0;", + " var macro_name = \"$_SERVICE\" + postman.getEnvironmentVariable(\"hgservice_macro_name\") + \"$\";", + " while (i < macroData.length) {", + " if (macro_name == macroData[i]['macro name'])", + " {", + " tests[\"Body contains added macro_name\"] = macro_name == macroData[i]['macro name'];", + " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"hgservice_macro_value\") == macroData[i]['macro value'];", + " break;", + " }", + " i++;", + " }", + " if (i == macroData.length)", + " tests[\"hgservice_macro_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmacro", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hgservice_macro_name}};{{hgservice_macro_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of conctacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", + " {", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_alias was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setseverity", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Unsetseverity", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontactgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name)", + " {", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "43-Servicegroups", + "description": "Tests all commands to manage service groups.", + "item": [ + { + "name": "Add service group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"sg\",\n \"values\": \"sg_test;alias_test\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"sg_test;name;{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};activate;{{sg_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};alias;{{sg_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};comment;{{sg_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List service group", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var sgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of service groups\"] = sgData;", + " var i = 0;", + " while (i < sgData.length) {", + " if (postman.getEnvironmentVariable(\"sg_name\") == sgData[i].name)", + " {", + " tests[\"Body contains added service group\"] = postman.getEnvironmentVariable(\"sg_name\") == sgData[i].name;", + " tests[\"Body contains added service alias\"] = postman.getEnvironmentVariable(\"sg_alias\") == sgData[i].alias;", + " break;", + " }", + " i++;", + " }", + " if (i == sgData.length)", + " tests[\"sg_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"sg\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getservice", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of services\"] = serviceData;", + " var i = 0;", + " while (i < serviceData.length) {", + " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'])", + " {", + " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", + " tests[\"Body contains added service\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"service_description was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhostgroupservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhostgroupservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethostgroupservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gethostgroupservice", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hgserviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of host group services\"] = hgserviceData;", + " var i = 0;", + " while (i < hgserviceData.length) {", + " if (postman.getEnvironmentVariable(\"hgservice_description\") == hgserviceData[i]['service description'])", + " {", + " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgserviceData[i]['hostgroup name'];", + " tests[\"Body contains added host hgservice_description\"] = postman.getEnvironmentVariable(\"hgservice_description\") == hgserviceData[i]['service description'];", + " break;", + " }", + " i++;", + " }", + " if (i == hgserviceData.length)", + " tests[\"hg_service_description was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"gethostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "44-Services_Categories", + "description": "Tests all commands to manage service categories.", + "item": [ + { + "name": "Setparam description", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};description;{{sc_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List service category", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var scData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of service categories\"] = scData;", + " var i = 0;", + " while (i < scData.length) {", + " if (postman.getEnvironmentVariable(\"sc_name\") == scData[i].name)", + " {", + " tests[\"Body contains added service category\"] = postman.getEnvironmentVariable(\"sc_name\") == scData[i].name;", + " tests[\"Body contains added description\"] = postman.getEnvironmentVariable(\"sc_description\") == scData[i].description;", + " break;", + " }", + " i++;", + " }", + " if (i == scData.length)", + " tests[\"sc_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"sc\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getservice", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of services\"] = serviceData;", + " var i = 0;", + " while (i < serviceData.length) {", + " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'])", + " {", + " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", + " tests[\"Body contains added service_description\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"service_description was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservicetemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getservicetemplate", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var stplData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of stpl_description\"] = stplData;", + " var i = 0;", + " while (i < stplData.length) {", + " if (postman.getEnvironmentVariable(\"stpl_description\") == hgserviceData[i]['service template description']){", + " tests[\"Body contains added stpl_description\"] = postman.getEnvironmentVariable(\"stpl_description\") == stplData[i]['service template description'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"stpl_description was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delservicetemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setservicetemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "50-Traps_Vendors", + "description": "Tests all commands to manage vendors.", + "item": [ + { + "name": "Add vendor", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;test_alias\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;name;{{vendor_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};alias;{{vendor_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam description", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};description;{{vendor_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List vendors", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var vendorData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of vendors\"] = vendorData;", + " var i = 0;", + " while (i < vendorData.length) {", + " if (postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name) {", + " tests[\"Body contains added vendor\"] = postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name;", + " tests[\"Body contains added vendor_alias\"] = postman.getEnvironmentVariable(\"vendor_alias\") == vendorData[i].alias;", + " break;", + " }", + " i++;", + " }", + " if (i == vendorData.length)", + " tests[\"vendor_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"show\",\n \"object\":\"vendor\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Generatetraps", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"generatetraps\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};{{mib_path}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "51-Traps_SNMP", + "description": "Tests all commands to manage traps.", + "item": [ + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};comments;{{trap_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam output", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};output;{{trap_output}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam oid", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};oid;{{trap_oid}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam status", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};status;{{trap_status}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam vendor", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};vendor;{{trap_vendor}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam matching_mode", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};matching_mode;{{trap_matching_mode}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam reschedule_svc_enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};reschedule_svc_enable;{{trap_reschedule_svc_enable}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam execution_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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam exec_command_enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command_enable;{{trap_exec_command_enable}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam submit_result_enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};submit_result_enable;{{trap_submit_result_enable}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List traps", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var trapData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of matchings\"] = trapData;", + " var i = 0;", + " while (i < trapData.length) {", + " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name) {", + " tests[\"Body contains added trap\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", + " tests[\"Body contains added trap oid\"] = postman.getEnvironmentVariable(\"trap_oid\") == trapData[i].oid;", + " break;", + " }", + " i++;", + " }", + " if (i == trapData.length)", + " tests[\"trap_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"show\",\n \"object\":\"trap\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addmatching", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};test_string;test_reg_exp;ok\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get matching id", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var matchingData = jsonData.result;", + "", + "try {", + " var i = 0;", + " while (i < matchingData.length) {", + " if (\"test_string\" == matchingData[i].string) {", + " postman.setEnvironmentVariable(\"trap_matching_token\",matchingData[i].id);", + " break;", + " }", + " i++;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Updatematching name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};string;{{trap_string}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Updatematching order", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};order;{{trap_matching_order}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Updatematching status", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};status;{{trap_status_string}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Updatematching regexp", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};regexp;{{trap_reg_exp}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmatching", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var matchingData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of matchings\"] = matchingData;", + " var i = 0;", + " while (i < matchingData.length) {", + " if (postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string) {", + " tests[\"Body contains added string\"] = postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string;", + " tests[\"Body contains added regular expression\"] = postman.getEnvironmentVariable(\"trap_reg_exp\") == matchingData[i].regexp;", + " tests[\"Body contains added matching status\"] = postman.getEnvironmentVariable(\"trap_status_string\") == matchingData[i].status;", + " tests[\"Body contains added matching order\"] = postman.getEnvironmentVariable(\"trap_matching_order\") == matchingData[i].order;", + " break;", + " }", + " i++;", + " }", + " if (i == matchingData.length)", + " tests[\"trap_string was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmatching", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "60-Downtimes", + "description": "Tests all commands to manage downtimes.", + "item": [ + { + "name": "Add downtime", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;descritpion_test\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;name;{{downtime_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam description", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};description;{{downtime_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List downtimes", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var downtimeData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of downtimes\"] = downtimeData;", + " var i = 0;", + " while (i < downtimeData.length) {", + " if (postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name){", + " tests[\"Body contains added downtime_name\"] = postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name;", + " tests[\"Body contains added downtime_description\"] = postman.getEnvironmentVariable(\"downtime_description\") == downtimeData[i].description;", + " break;", + " }", + " i++;", + " }", + " if (i == engineData.length)", + " tests[\"enine_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"DOWNTIME\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addweeklyperiod", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addweeklyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{weekly_start_time}};{{weekly_end_time}};{{weekly_fixed}};{{weekly_duration}};{{weekly_day_of_week}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addmonthlyperiod", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addmonthlyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{monthly_start_time}};{{monthly_end_time}};{{monthly_fixed}};{{monthly_duration}};{{monthly_day_of_month}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addspecificperiod", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addspecificperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{specific_start}};{{specific_end}};{{specific_fixed}};{{specific_duration}};{{specific_day_of_week}};{{specific_month_cycle}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List periods", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var downtimeData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of downtimes\"] = downtimeData;", + " var test_start_w = postman.getEnvironmentVariable(\"weekly_start_time\") + ':00';", + " var test_start_m = postman.getEnvironmentVariable(\"monthly_start_time\") + ':00';", + " var test_start_s = postman.getEnvironmentVariable(\"specific_start\") + ':00';", + " for (var i = 0; i < downtimeData.length; i++) {", + " if (test_start_w == downtimeData[i]['start time'])", + " {", + " tests[\"Body contains added weekly_start_time\"] = test_start_w == downtimeData[i]['start time'];", + " var test_end = postman.getEnvironmentVariable(\"weekly_end_time\") + ':00';", + " tests[\"Body contains added weekly_end_time\"] = test_end == downtimeData[i]['end time'];", + " tests[\"Body contains added weekly_fixed\"] = postman.getEnvironmentVariable(\"weekly_fixed\") == downtimeData[i].fixed;", + " if (downtimeData[i].fixed == \"0\")", + " tests[\"Body contains added weekly_duration\"] = postman.getEnvironmentVariable(\"weekly_duration\") == downtimeData[i].duration;", + " tests[\"Body contains added weekly_day_of_week\"] = postman.getEnvironmentVariable(\"weekly_number_days_of_week\") == downtimeData[i]['day of week'];", + " }", + " if (test_start_m == downtimeData[i]['start time'])", + " {", + " tests[\"Body contains added monthly_start_time\"] = test_start_m == downtimeData[1]['start time'];", + " var test_end = postman.getEnvironmentVariable(\"monthly_end_time\") + ':00';", + " tests[\"Body contains added monthly_end_time\"] = test_end == downtimeData[i]['end time'];", + " tests[\"Body contains added monthly_fixed\"] = postman.getEnvironmentVariable(\"monthly_fixed\") == downtimeData[i].fixed;", + " if (downtimeData[i].fixed == \"0\")", + " tests[\"Body contains added monthly_duration\"] = postman.getEnvironmentVariable(\"monthly_duration\") == downtimeData[i].duration;", + " tests[\"Body contains added monthly_day_of_month\"] = postman.getEnvironmentVariable(\"monthly_day_of_month\") == downtimeData[i]['day of month'];", + " }", + " if (test_start_s == downtimeData[i]['start time'])", + " {", + " tests[\"Body contains added specific_start_time\"] = test_start_s == downtimeData[i]['start time'];", + " var test_end = postman.getEnvironmentVariable(\"specific_end\") + ':00';", + " tests[\"Body contains added specific_end_time\"] = test_end == downtimeData[i]['end time'];", + " tests[\"Body contains added specific_fixed\"] = postman.getEnvironmentVariable(\"specific_fixed\") == downtimeData[i].fixed;", + " if (downtimeData[i].fixed == \"0\")", + " tests[\"Body contains added specific_duration\"] = postman.getEnvironmentVariable(\"specific_duration\") == downtimeData[i].duration;", + " tests[\"Body contains added specific_day_of_week\"] = postman.getEnvironmentVariable(\"specific_number_day_of_week\") == downtimeData[i]['day of week'];", + " }", + " }", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listperiods\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhost", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhost", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethost", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservicegroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delservicegroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setservicegroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Show Service Realtime", + "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\";", + "", + "var jsonData = JSON.parse(responseBody);", + "var result = jsonData.result;", + "", + "var schema = {", + " \"type\": \"array\",", + " \"items\": {", + " \"type\": \"object\",", + " \"properties\": {", + " \"host_name\": {", + " \"type\": \"string\"", + " },", + " \"service_name\": {", + " \"type\": \"string\"", + " },", + " \"author\": {", + " \"type\": \"string\"", + " },", + " \"actual_start_time\": {", + " \"type\": \"string\"", + " },", + " \"end_time\": {", + " \"type\": \"string\"", + " },", + " \"comment_data\": {", + " \"type\": \"string\"", + " },", + " \"duration\": {", + " \"type\": \"string\"", + " },", + " \"fixed\": {", + " \"type\": \"string\"", + " },", + " \"url\": {", + " \"type\": \"string\"", + " }", + " },", + " \"additionalProperties\": false,", + " \"required\": [\"host_name\", \"service_name\", \"author\", \"actual_start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", + " }", + "}", + "", + "tests[\"Validate schema JSON\"] = tv4.validate(result, schema);" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;esx-alger-01|ping\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Show Host Realtime", + "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\";", + "", + "var jsonData = JSON.parse(responseBody);", + "var result = jsonData.result;", + "", + "var schema = {", + " \"type\": \"array\",", + " \"items\": {", + " \"type\": \"object\",", + " \"properties\": {", + " \"host_name\": {", + " \"type\": \"string\"", + " },", + " \"author\": {", + " \"type\": \"string\"", + " },", + " \"actual_start_time\": {", + " \"type\": \"string\"", + " },", + " \"end_time\": {", + " \"type\": \"string\"", + " },", + " \"comment_data\": {", + " \"type\": \"string\"", + " },", + " \"duration\": {", + " \"type\": \"string\"", + " },", + " \"fixed\": {", + " \"type\": \"string\"", + " },", + " \"url\": {", + " \"type\": \"string\"", + " }", + " },", + " \"additionalProperties\": false,", + " \"required\": [\"host_name\", \"author\", \"actual_start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", + " }", + "}", + "", + "tests[\"Validate schema JSON\"] = tv4.validate(result, schema);" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;esx-alger-01\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhost Realtime", + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "postman.setGlobalVariable(\"fixed\", \"1\");", + "", + "var date = new Date();", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + ('0' + date.getHours()).slice(-2) + \":\" + ", + " ('0' + date.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", + "", + "var dateEnd = new Date(date.setHours(date.getHours()+1));", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + ('0' + dateEnd.getHours()).slice(-2) + \":\" + ", + "('0' + dateEnd.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"end_time\", datetime_end);", + "" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;esx-alger-01;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire\"\n}\n" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservice Realtime", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "postman.setGlobalVariable(\"fixed\", \"1\");", + "", + "var date = new Date();", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + ('0' + date.getHours()).slice(-2) + \":\" + ", + " ('0' + date.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", + "", + "var dateEnd = new Date(date.setHours(date.getHours()+1));", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + ('0' + dateEnd.getHours()).slice(-2) + \":\" + ", + "('0' + dateEnd.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"end_time\", datetime_end);", + "" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;esx-alger-01|ping;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhostgroup Realtime", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "postman.setGlobalVariable(\"fixed\", \"1\");", + "", + "var date = new Date();", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", + " ('0' + date.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", + "", + "var dateEnd = new Date(date.setHours(date.getHours()+1));", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", + "('0' + dateEnd.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"end_time\", datetime_end);" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HG;Databases1;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservicegroup Realtime", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "postman.setGlobalVariable(\"fixed\", \"1\");", + "", + "var date = new Date();", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", + " ('0' + date.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", + "", + "var dateEnd = new Date(date.setHours(date.getHours()+1));", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", + "('0' + dateEnd.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"end_time\", datetime_end);" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SG;Traffic-Europe;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addinstance Realtime", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "postman.setGlobalVariable(\"fixed\", \"1\");", + "", + "var date = new Date();", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", + " ('0' + date.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", + "", + "var dateEnd = new Date(date.setHours(date.getHours()+1));", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", + "('0' + dateEnd.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"end_time\", datetime_end);" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;Central;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "61-Dependencies", + "description": "Tests all commands to manage dependencies.", + "item": [ + { + "name": "Add dependency", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"dep\",\n \"values\": \"dep_test;test_description;{{dep_type}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"dep_test;name;{{dep_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam description", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};description;{{dep_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};comment;{{dep_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam inherits_parent", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};inherits_parent;{{dep_inherits_parent}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam exec_fail_criteria", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};execution_failure_criteria;{{dep_exec_fail_crit}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notif_fail_criteria", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};notification_failure_criteria;{{dep_notif_fail_crit}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List dependencies", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var depData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of dependencies\"] = depData;", + " var i = 0;", + " while (i < depData.length) {", + " if (postman.getEnvironmentVariable(\"dep_name\") == depData[i].name)", + " {", + " tests[\"Body contains added dep_name\"] = postman.getEnvironmentVariable(\"dep_name\") == depData[i].name;", + " tests[\"Body contains added dep_description\"] = postman.getEnvironmentVariable(\"dep_description\") == depData[i].description;", + " tests[\"Body contains added dep_inherits_parents\"] = postman.getEnvironmentVariable(\"dep_inherits_parent\") == depData[i].inherits_parent;", + " tests[\"Body contains added dep_execution_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_exec_fail_crit\") == depData[i].execution_failure_criteria;", + " tests[\"Body contains added dep_notification_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_notif_fail_crit\") == depData[i].notification_failure_criteria;", + " break;", + " }", + " i++;", + " }", + " if (i == depData.length)", + " tests[\"dep_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"dep\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create host3", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name3}};{{host_name3}};0.0.0.0;;central;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addchild", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Listdep", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var depData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of dependencies\"] = depData;", + " var i = 0;", + " var nb_find = 0", + " while (i < depData.length) {", + " if (postman.getEnvironmentVariable(\"host_name\") == depData[i].parents)", + " {", + " tests[\"Body contains added a parent\"] = postman.getEnvironmentVariable(\"host_name\") == depData[i].parents;", + " nb_find += 1;", + " }", + " if (postman.getEnvironmentVariable(\"host_name3\") == depData[i].children)", + " {", + " tests[\"Body contains added a child\"] = postman.getEnvironmentVariable(\"host_name3\") == depData[i].children;", + " nb_find += 1;", + " }", + " if (nb_find == 2)", + " break;", + " i++;", + " }", + " if (i == depData.length)", + " tests[\"the child and the parent were found\"] = i < depData.length;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listdep\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delchild", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "70-ACL_Groups", + "description": "Tests all commands to manage ACL groups.", + "item": [ + { + "name": "Add ACL group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;aclg_alias\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;name;{{aclg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};alias;{{aclg_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};activate;{{aclg_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List ACL groups", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL groups\"] = aclgData;", + " var i = 0;", + " while (i < aclgData.length) {", + " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", + " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", + " tests[\"Body contains added aclg_alias\"] = postman.getEnvironmentVariable(\"aclg_alias\") == aclgData[i].alias;", + " tests[\"Body contains added aclg_activate\"] = postman.getEnvironmentVariable(\"aclg_activate\") == aclgData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == aclgData.length)", + " tests[\"aclg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"aclgroup\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add resource ACL", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;test_alias\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;name;{{racl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addresource", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delresource", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setresource", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getresource", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var raclData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL resources\"] = raclData;", + " var i = 0;", + " while (i < raclData.length) {", + " if (postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name) {", + " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == raclData.length)", + " tests[\"racl_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", + " tests[\"Body contains added contact\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"aclg_contact_alias was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontactgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add ACL Menu", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;test_alias\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;name;{{aclmenu_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addmenu", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmenu", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmenu", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmenu", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclmenuData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL menus\"] = aclmenuData;", + " var i = 0;", + " while (i < aclmenuData.length) {", + " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", + " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == aclmenuData.length)", + " tests[\"menu_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add ACL action", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;acla_description\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;name;{{acla_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addaction", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delaction", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setaction", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getaction", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclaData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL actions\"] = aclaData;", + " var i = 0;", + " while (i < aclaData.length) {", + " if (postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name) {", + " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == aclaData.length)", + " tests[\"acla_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "71-ACL_Menus", + "description": "Tests all commands to manage ACL menu.", + "item": [ + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};alias;{{aclmenu_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};activate;{{aclmenu_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};comment;{{aclmenu_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List ACL menu", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclmenuData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL Menu\"] = aclmenuData;", + " var i = 0;", + " while (i < aclmenuData.length) {", + " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", + " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", + " tests[\"Body contains added aclmenu_alias\"] = postman.getEnvironmentVariable(\"aclmenu_alias\") == aclmenuData[i].alias;", + " tests[\"Body contains added aclmenu_comment\"] = postman.getEnvironmentVariable(\"aclmenu_comment\") == aclmenuData[i].comment;", + " tests[\"Body contains added aclmenu_activate\"] = postman.getEnvironmentVariable(\"aclmenu_activate\") == aclmenuData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == aclmenuData.length)", + " tests[\"aclmenu_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"aclmenu\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get ACL Groups", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL Menu\"] = aclgData;", + " var i = 0;", + " while (i < aclgData.length) {", + " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", + " tests[\"Body contains ACL menu\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i > aclgData.length)", + " tests[\"aclg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw Home", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke Home", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw Custom Views", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke Custom Views", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw Edit View", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke Edit View", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw Share View", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke Share View", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw Widget Parameters", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke Widget Parameters", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw Add Widget", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke Add Widget", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw rotation", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke rotation", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw delete view", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke delete view", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw add view", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke add view", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw set default", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke set default", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw poller statistics", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke poller statistics", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw broker statistics", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke broker statistics", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw graphs (poller)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke graphs (poller)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw monitoring", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke monitoring", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw status details", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke status details", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services (monitoring)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services (monitoring)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw hosts (monitoring)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke hosts (monitoring)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services grid", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services grid", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services by hostgroup", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services by hostgroup", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services by servicegroup", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services by servicegroup", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw hostgroups summary", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke hostgroups summary", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw performances", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke performances", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw graphs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke graphs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw chart split", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke chart split", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw chart periods", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke chart periods", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw templates (perf)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke templates (perf)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw curves", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke curves", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw metrics", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke metrics", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw event logs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke event logs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw event logs (advanced)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke event logs (advanced)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw system logs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke system logs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw downtimes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke downtimes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw downtimes (main menu)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke downtimes (main menu)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw recurrent downtimes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro recurrent downtimes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke recurrent downtimes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw comments", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke comments", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw reporting", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke reporting", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw dashboard", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke dashboard", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw hosts (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke hosts (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw host groups (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host groups (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw service groups (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service groups (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant hostsrw (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke hosts (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant hostsrw (config/host)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant hostsro (config/host)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke hosts (config/host)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw host groups (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro host groups (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host groups (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw templates (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro templates (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke templates (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw categories (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro categories (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke categories (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services by host (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro services by host (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services by host (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services by host group (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro services by host group (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services by host group (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw service groups (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro service groups (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service groups (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw templates (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro templates (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke templates (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw categories (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro categories (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke categories (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw meta services(config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke meta services(config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw users", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke users", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw Contacts / Users", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro Contacts / Users", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke Contacts / Users", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw contact templates", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro contact templates", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke contact templates", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw contact groups", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro contact groups", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke contact groups", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw time periods", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro time periods", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke time periods", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw commands", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke commands", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw discovery", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro discovery", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke discovery", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw miscellaneous", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro miscellaneous", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke miscellaneous", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw connectors", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro connectors", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke connectors", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw escalations", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro escalations", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke escalations", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw hosts (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro hosts (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke hosts (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw host groups (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro host groups (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host groups (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services(dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro services(dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services(dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw service groups(dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro service groups(dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service groups(dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw meta services (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro meta services (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke meta services (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw SNMP traps (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke SNMP traps (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw SNMP traps (SNMP)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;snmp traps\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke SNMP traps (SNMP)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;snmp traps\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw manufacturer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;manufacturer\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke manufacturer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;manufacturer\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw group (SNMP)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;group\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke group (SNMP)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;group\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw mibs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;mibs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke mibs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;mibs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw generate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;generate\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke generate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;generate\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw knowledge base", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke knowledge base", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw hosts (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke hosts (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw host templates (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;host templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host templates (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;host templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw service templates (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;service templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service templates (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;service templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw pollers (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke pollers (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw export configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;export configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke export configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;export configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw pollers (pollers)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro pollers (pollers)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke pollers (pollers)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw engine configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro engine configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke engine configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw broker configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke broker configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw wizard", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizard\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke wizard", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizard\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw wizardajax", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizardajax\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke wizardajax", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizardajax\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw resources", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;resources\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke resources", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;resources\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw administration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke administration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw parameters", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke parameters", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw centreon UI", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centreon UI\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke centreon UI", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centreon UI\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw monitoring (parameters)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;monitoring\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke monitoring (parameters)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;monitoring\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw centcore", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centcore\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke centcore", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centcore\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw my account", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;my account\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke my account", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;my account\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw LDAP", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;LDAP\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke LDAP", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;LDAP\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw RRDtool", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;RRDtool\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke RRDtool", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;RRDtool\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw debug", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;debug\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke debug", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;debug\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw knowledge base (parameters)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;knowledge base\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke knowledge base (parameters)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;knowledge base\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw CSS", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;CSS\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke CSS", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;CSS\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw backup", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;backup\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke backup", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;backup\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;options\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;options\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw data", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;data\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke data", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;data\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw images", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;images\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke images", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;images\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw extensions", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke extensions", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw modules", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;modules\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke modules", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;modules\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw widgets", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;widgets\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke widgets", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;widgets\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw ACL", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke ACL", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw access groups", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;access groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke access groups", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;access groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw menus access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;menus access\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke menus access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;menus access\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw resources access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;resources access\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke resources access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;resources access\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw actions access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;actions access\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke actions access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;actions access\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw reload ACL", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;reload ACL\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke reload ACL", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;reload ACL\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw logs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke logs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw visualisation", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs;visualisation\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke visualisation", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs;visualisation\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw sessions", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;sessions\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke sessions", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;sessions\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw server status", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke server status", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw databases", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status;databases\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke databases", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status;databases\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw about (admin)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke about (admin)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw about (about)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about;about\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke about (about)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about;about\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "72-ACL_Resources", + "description": "Tests all commands to manage Resource ACL.", + "item": [ + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};alias;{{racl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};activate;{{racl_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List resource ACL", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var raclData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL resource\"] = raclData;", + " var i = 0;", + " while (i < raclData.length) {", + " if (postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name) {", + " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name;", + " tests[\"Body contains added racl_alias\"] = postman.getEnvironmentVariable(\"racl_alias\") == raclData[i].alias;", + " tests[\"Body contains added racl_activate\"] = postman.getEnvironmentVariable(\"racl_activate\") == raclData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == raclData.length)", + " tests[\"racl_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"aclresource\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getaclgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL groups\"] = aclgData;", + " var i = 0;", + " while (i < aclgData.length) {", + " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", + " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == aclgData.length)", + " tests[\"aclg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant_host", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant_host\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke_host", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke_host\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant_hostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant_hostgroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke_hostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke_hostgroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant_servicegroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant_servicegroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke_servicegroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke_servicegroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "addhostexclusion", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhostexclusion\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "delhostexclusion", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhostexclusion\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "addfilter_instance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addfilter_instance\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "delfilter_instance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delfilter_instance\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "addfilter_hostcategory", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addfilter_hostcategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "delfilter_hostcategory", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delfilter_hostcategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "addfilter_servicecategory", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addfilter_servicecategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "delfilter_servicecategory", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delfilter_servicecategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "74-ACL_Actions", + "description": "Tests all commands to manage ACL action.", + "item": [ + { + "name": "Setparam description", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};description;{{acla_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};activate;{{acla_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List ACL actions", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclaData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL actions\"] = aclaData;", + " var i = 0;", + " while (i < aclaData.length) {", + " if (postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name) {", + " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name;", + " tests[\"Body contains added acla_description\"] = postman.getEnvironmentVariable(\"acla_description\") == aclaData[i].description;", + " tests[\"Body contains added acla_activate\"] = postman.getEnvironmentVariable(\"acla_activate\") == aclaData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == aclaData.length)", + " tests[\"acla_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"aclaction\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getaclgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclaData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL actions\"] = aclaData;", + " var i = 0;", + " while (i < aclaData.length) {", + " if (postman.getEnvironmentVariable(\"aclg_name\") == aclaData[i].name) {", + " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclaData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == aclaData.length)", + " tests[\"aclg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_event_handler", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_event_handler\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_event_handler", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_event_handler\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_flap_detection", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_flap_detection\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_flap_detection", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_flap_detection\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_host_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_host_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_host_obsess", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_obsess\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_host_obsess", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_obsess\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_host_passive_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_passive_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_host_passive_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_passive_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_perf_data", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_perf_data\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_perf_data", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_perf_data\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_restart", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_restart\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_restart", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_restart\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_service_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_service_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_service_obsess", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_obsess\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_service_obsess", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_obsess\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_service_passive_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_passive_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_service_passive_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_passive_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_shutdown", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_shutdown\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_shutdown", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_shutdown\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_acknowledgement", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_acknowledgement\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_acknowledgement", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_acknowledgement\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_checks_for_services", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks_for_services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_checks_for_services", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks_for_services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_comment\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_comment\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_event_handler", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_event_handler\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_event_handler", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_event_handler\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_flap_detection", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_flap_detection\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_flap_detection", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_flap_detection\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_notifications_for_services", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications_for_services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_notigications_for_services", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications_for_services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_schedule_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_schedule_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_schedule_downtime", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_forced_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_schedule_downtime", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_downtime\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_schedule_forced_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_forced_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_schedule_forced_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_forced_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_submit_result", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_submit_result\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_submit_result", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_submit_result\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant poller_listing", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_listing\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke poller_listing", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_listing\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant poller_stats", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_stats\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke poller_stats", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_stats\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_acknowledgement", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_acknowledgement\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_acknowledgement", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_acknowledgement\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_comment\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_comment\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_event_handler", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_event_handler\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_event_handler", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_event_handler\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_flap_detection", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_flap_detection\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_flap_detection", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_flap_detection\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_passive_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_passive_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_passive_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_passive_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_schedule_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_schedule_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_schedule_downtime", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_downtime\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_schedule_downtime", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_downtime\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_schedule_forced_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_forced_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_schedule_forced_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_forced_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_submit_result", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_submit_result\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_submit_result", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_submit_result\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant top_counter", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};top_counter\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke top_counter", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};top_counter\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "75-ACL_Reload", + "description": "Tests all commands to manage ACL.", + "item": [ + { + "name": "Reload", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"reload\",\n \"object\": \"acl\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Lastreload", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"lastreload\",\n \"object\": \"acl\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Lastreload input time", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"lastreload\",\n \"object\": \"acl\",\n \"values\": \"lastreload_time\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "80-Administration_General_Settings", + "description": "Tests all commands to manage settings.", + "item": [ + { + "name": "Setparam broker", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"broker;{{broker_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam broker_correlator_script", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"broker_correlator_script;{{broker_correlator_script}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam centstorage", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"centstorage;{{centstorage_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam debug_auth", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_auth;{{enable_debug_auth}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam debug_ldap_import", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_ldap_import;{{enable_ldap_debug}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam debug_nagios_import", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_nagios_import;{{enable_nagios_debug}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam debug_path", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_path;{{debug_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam debug_rrdtool", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_rrdtool;{{enable_debug_rrdtool}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam enable_autologin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_autologin;{{enable_autologin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam enable_gmt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_gmt;{{enable_gmt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam enable_logs_sync", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_logs_sync;{{enable_logs_sync}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam enable_perfdata_sync", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_perfdata_sync;{{enable_perfdata_sync}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam gmt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"gmt;{{gmt_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam interval_length", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"interval_length;{{interval_length}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam mailer_path_bin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"mailer_path_bin;{{mailer_path_bin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam nagios_path_img", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"nagios_path_img;{{nagios_path_img}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam perl_library_path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"perl_library_path;{{perl_library_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam rrdtool_path_bin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"rrdtool_path_bin;{{rrdtool_path_bin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam snmpttconvertmib_path_bin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"snmpttconvertmib_path_bin;{{snmpttconvertmib_path_bin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam snmptt_unknowntrap_log_file", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"snmptt_unknowntrap_log_file;{{snmptt_unknowntrap_log_file}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List settings", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var exceptionData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of exceptions\"] = exceptionData;", + " for (var i = 0; i < exceptionData.length; i++) {", + " switch (exceptionDate[i].parameter)", + " {", + " case \"broker\":", + " tests[\"Body contains the correct setting broker\"] = postman.getEnvironmentVariable(\"broker_value\") == exceptionData[i].value;", + " break;", + " case \"broker_correlator_script\":", + " tests[\"Body contains the correct setting broker_correlator_script\"] = postman.getEnvironmentVariable(\"broker_correlator_script\") == exceptionData[i].value;", + " break;", + " case \"debug_auth\":", + " tests[\"Body contains the correct setting debug_auth\"] = postman.getEnvironmentVariable(\"enable_debug_auth\") == exceptionData[i].value;", + " break;", + " case \"debug_ldap_import\":", + " tests[\"Body contains the correct setting debug_ldap_import\"] = postman.getEnvironmentVariable(\"enable_ldap_debug\") == exceptionData[i].value;", + " break;", + " case \"debug_nagios_import\":", + " tests[\"Body contains the correct setting debug_nagios_ldap\"] = postman.getEnvironmentVariable(\"enable_nagios_debug\") == exceptionData[i].value;", + " break;", + " case \"debug_path\":", + " tests[\"Body contains the correct setting debug_path\"] = postman.getEnvironmentVariable(\"debug_path\") == exceptionData[i].value;", + " break;", + " case \"debug_rrdtool\":", + " tests[\"Body contains the correct setting debug_rrdtool\"] = postman.getEnvironmentVariable(\"enable_debug_rrdtool\") == exceptionData[i].value;", + " break;", + " case \"enable_autologin\":", + " tests[\"Body contains the correct setting enable_authologin\"] = postman.getEnvironmentVariable(\"enable_autologin\") == exceptionData[i].value;", + " break;", + " case \"enable_logs_sync\":", + " tests[\"Body contains the correct setting enable_logs_sync\"] = postman.getEnvironmentVariable(\"enable_logs_sync\") == exceptionData[i].value;", + " break;", + " case \"enable_perfdata_sync\":", + " tests[\"Body contains the correct setting enable_logs_sync\"] = postman.getEnvironmentVariable(\"enable_logs_sync\") == exceptionData[i].value;", + " break;", + " case \"enable_perfdata_sync\":", + " tests[\"Body contains the correct setting enable_perfdata_sync\"] = postman.getEnvironmentVariable(\"enable_perfdata_sync\") == exceptionData[i].value;", + " break;", + " case \"gmt\":", + " tests[\"Body contains the correct setting gmt\"] = postman.getEnvironmentVariable(\"gmt_value\") == exceptionData[i].value;", + " break;", + " case \"interval_length\":", + " tests[\"Body contains the correct setting interval_length\"] = postman.getEnvironmentVariable(\"interval_length\") == exceptionData[i].value;", + " break;", + " case \"mailer_path_bin\":", + " tests[\"Body contains the correct setting mailer_path_bin\"] = postman.getEnvironmentVariable(\"mailer_path_bin\") == exceptionData[i].value;", + " break;", + " case \"nagios_path_img\":", + " tests[\"Body contains the correct setting nagios_path_img\"] = postman.getEnvironmentVariable(\"nagios_path_img\") == exceptionData[i].value;", + " break;", + " case \"perl_library_path\":", + " tests[\"Body contains the correct setting perl_library_path\"] = postman.getEnvironmentVariable(\"perl_library_path\") == exceptionData[i].value;", + " break;", + " case \"rrdtool_path_bin\":", + " tests[\"Body contains the correct setting rrdtool_path_bin\"] = postman.getEnvironmentVariable(\"rrdtool_path_bin\") == exceptionData[i].value;", + " break;", + " case \"snmpttconvertmib_path_bin\":", + " tests[\"Body contains the correct setting snmpttconvertmib_path_bin\"] = postman.getEnvironmentVariable(\"snmpttconvertmib_path_bin\") == exceptionData[i].value;", + " break;", + " case \"snmptt_unknowntrap_log_file\":", + " tests[\"Body contains the correct setting snmptt_unknowntrap_log_file\"] = postman.getEnvironmentVariable(\"snmptt_unknowntrap_log_file\") == exceptionData[i].value;", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"show\",\n \"object\":\"settings\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "81-Administration_LDAP_Settings", + "description": "Tests all commands to manage LDAP.", + "item": [ + { + "name": "Add LDAP", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"ldap\",\n \"values\": \"test_ldap;test_description\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"test_ldap;name;{{ldap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam description", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};description;{{ldap_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};enable;{{ldap_enable}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};alias;{{ldap_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam bind_dn", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};bind_dn;{{ldap_bind_dn}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam bind_pass", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};bind_pass;{{ldap_bind_pass}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam group_base_search", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_base_search;{{ldap_group_base_search}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam group_filter", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_filter;{{ldap_group_filter}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam group_member", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_member;{{ldap_group_member}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam group_name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_name;{{ldap_group_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_auto_import", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_auto_import;{{ldap_auto_import}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_contact_tmpl", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_contact_tmpl;{{ctpl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_dns_use_domain", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_dns_use_domain;{{ldap_dns_use_domain}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_search_limit", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_search_limit;{{ldap_search_limit}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_search_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_search_timeout;{{ldap_search_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_srv_dns", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_srv_dns;{{ldap_srv_dns}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_store_password", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_store_password;{{ldap_store_pwd}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_template", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_template;{{ldap_tpl}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam protocol_version", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};protocol_version;{{ldap_protocol_version}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_base_search", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_base_search;{{ldap_user_base_search}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_email", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_email;{{ldap_user_email}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_filter", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_filter;{{ldap_user_filter}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_firstname", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_firstname;{{ldap_user_firstname}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_lastname", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_lastname;{{ldap_user_lastname}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_name;{{ldap_user_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_pager", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_pager;{{ldap_user_pager}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_group;{{ldap_user_group}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List LDAP", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var ldapData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ldap configurations\"] = ldapData;", + " var i = 0;", + " while (i < ldapData.length) {", + " if (postman.getEnvironmentVariable(\"ldap_name\") == ldapData[i].name) {", + " tests[\"Body contains added ldap_name\"] = postman.getEnvironmentVariable(\"ldap_name\") == ldapData[i].name;", + " tests[\"Body contains added ldap_description\"] = postman.getEnvironmentVariable(\"ldap_description\") == ldapData[i].description;", + " tests[\"Body contains added ldap_enable\"] = postman.getEnvironmentVariable(\"ldap_enable\") == ldapData[i].status;", + " break;", + " }", + " i++;", + " }", + " if (i == ldapData.length)", + " tests[\"ldap_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"ldap\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addserver", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};{{ldap_server_address}};{{ldap_server_port}};{{ldap_use_ssl}};{{ldap_use_tls}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get server id", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serverData = jsonData.result;", + "", + "try {", + " var i = 0;", + " while (i < serverData.length) {", + " if (postman.getEnvironmentVariable(\"ldap_server_address\") == serverData[i].address) {", + " postman.setEnvironmentVariable(\"ldap_server_id\",serverData[i].id);", + " break;", + " }", + " i++;", + " }", + " if (i == serverData.length)", + " tests[\"ldap_server_adress was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"showserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparamserver host_address", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};host_address;{{ldap_host_address}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparamserver host_port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};host_port;{{ldap_host_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparamserver host_order", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};host_order;{{ldap_host_order}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparamserver use_ssl", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};use_ssl;{{ldap_use_ssl_changed}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparamserver use_tls", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};use_tls;{{ldap_use_tls_changed}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Showserver", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serverData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of servers\"] = serverData;", + " var i = 0;", + " while (i < serverData.length) {", + " if (postman.getEnvironmentVariable(\"ldap_host_address\") == serverData[i].address) {", + " tests[\"Body contains added server\"] = postman.getEnvironmentVariable(\"ldap_host_address\") == serverData[i].address;", + " tests[\"Body contains added server_port\"] = postman.getEnvironmentVariable(\"ldap_host_port\") == serverData[i].port;", + " tests[\"Body contains added server_use_ssl\"] = postman.getEnvironmentVariable(\"ldap_use_ssl_changed\") == serverData[i].ssl;", + " tests[\"Body contains added server_use_tls\"] = postman.getEnvironmentVariable(\"ldap_use_tls_changed\") == serverData[i].tls;", + " tests[\"Body contains added server_use_tls\"] = postman.getEnvironmentVariable(\"ldap_host_order\") == serverData[i].order;", + " break;", + " }", + " i++;", + " }", + " if (i == serverData.length)", + " tests[\"ldap_server_address was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"showserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delserver", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "90-Engine_CFG", + "description": "Tests all commands to manage ACL.", + "item": [ + { + "name": "Add engine_CFG", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_nagios_config}};{{instance_name}};{{engine_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_nagios_config}};nagios_name;{{engine_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam instance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};instance;{{instance_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam broker_module", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};broker_module;{{instance_broker_module}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};nagios_activate;{{instance_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List engine_CFG", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var engineData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of downtimes\"] = engineData;", + " var i = 0;", + " while (i < engineData.length) {", + " if (postman.getEnvironmentVariable(\"engine_name\") == engineData[i]['nagios name']){", + " tests[\"Body contains added engine_name\"] = postman.getEnvironmentVariable(\"engine_name\") == engineData[i]['nagios name'];", + " tests[\"Body contains added instance_name2\"] = postman.getEnvironmentVariable(\"instance_name2\") == engineData[i].instance;", + " tests[\"Body contains added engine_comment\"] = postman.getEnvironmentVariable(\"engine_comment\") == engineData[i]['nagios comment'];", + " break;", + " }", + " i++;", + " }", + " if (i == engineData.length)", + " tests[\"engine_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"enginecfg\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addbrokermodule", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addbrokermodule\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};{{instance_broker_module2}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "99-Delete", + "description": "", + "item": [ + { + "name": "Del ACL action", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del ACL group", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del ACL Menu", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del resource ACL", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del 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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del contact group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del ctpl", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del ctpl2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del contact", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del contact2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del dependencies", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del downtime", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del engine_CFG", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del host category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del hgservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del host group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del host group2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del resource CFG", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del Instance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del Instance2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del service", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del host3", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"host\",\n \"values\": \"{{host_name3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del htpl2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del htpl3", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del LDAP", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del service group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del service template", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del service template2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del service category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del host", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del htpl", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del tp", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del trap", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del vendor", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delinput ipv4", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delinput ipv6", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delinput file", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Dellogger file", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Dellogger standard", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Dellogger syslog", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Dellogger monitoring", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deloutput ipv4", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deloutput ipv6", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deloutput file", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deloutput rrd", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deloutput storage", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deloutput sql", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del broker", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del host2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + } + ] } \ No newline at end of file diff --git a/www/class/centreon-clapi/centreonRtDowntime.class.php b/www/class/centreon-clapi/centreonRtDowntime.class.php index 43701149151..2274c9ecb48 100644 --- a/www/class/centreon-clapi/centreonRtDowntime.class.php +++ b/www/class/centreon-clapi/centreonRtDowntime.class.php @@ -173,17 +173,16 @@ public function showHost($hostList) $fields = array( 'host_name', 'author', - 'actual_start_time', + 'start_time', 'end_time', 'comment_data', 'duration', 'fixed', - 'url' + 'url', ); echo implode($this->delim, $fields)."\n"; - // Résultat des la recherche dans la base $hostList = array_filter(explode('|', $hostList)); $hostList = array_map( function ($element) { @@ -192,9 +191,10 @@ function ($element) { $hostList ); - // Résultat des la recherche dans la base + // Result of the research in the base $hostDowntimesList = $this->object->getHostDowntimes($hostList); + //Separates hosts foreach ($hostDowntimesList as $hostDowntime) { $url = ''; if (isset($_SERVER['HTTP_HOST'])) { @@ -213,15 +213,16 @@ public function showSvc($svcList) 'host_name', 'service_name', 'author', - 'actual_start_time', + 'start_time', 'end_time', 'comment_data', 'duration', 'fixed', - 'url' + 'url', ); echo implode($this->delim, $fields)."\n"; + $svcList = array_filter(explode('|', $svcList)); $svcList = array_map( function ($arrayElem) { @@ -230,9 +231,10 @@ function ($arrayElem) { $svcList ); - // Résultat des la recherche dans la base + // Result of the research in the base $serviceDowntimesList = $this->object->getSvcDowntimes($svcList); + //Separates hosts and services foreach ($serviceDowntimesList as $hostDowntime) { $url = ''; if (isset($_SERVER['HTTP_HOST'])) { From 2fa034b1385d0e8587b81711290eef970cccac61 Mon Sep 17 00:00:00 2001 From: Guillaume28 Date: Tue, 26 Sep 2017 16:01:14 +0200 Subject: [PATCH 12/16] Set timestamp to date --- .../centreonRtDowntime.class.php | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/www/class/centreon-clapi/centreonRtDowntime.class.php b/www/class/centreon-clapi/centreonRtDowntime.class.php index 2274c9ecb48..d70471a13cd 100644 --- a/www/class/centreon-clapi/centreonRtDowntime.class.php +++ b/www/class/centreon-clapi/centreonRtDowntime.class.php @@ -77,6 +77,7 @@ public function __construct() $this->hgObject = new \CentreonHostgroups($this->db); $this->sgObject = new \CentreonServiceGroups($this->db); $this->instanceObject = new \CentreonInstance($this->db); + $this->GMTObject = new \CentreonGMT($this->db); $this->externalCmdObj = new \CentreonExternalCommand(); $this->action = "RTDOWNTIME"; $this->externalCmdObj->setUserAlias(CentreonUtils::getUserName()); @@ -170,6 +171,8 @@ public function show($parameters = null) */ public function showHost($hostList) { + global $centreon; + $fields = array( 'host_name', 'author', @@ -198,8 +201,20 @@ function ($element) { foreach ($hostDowntimesList as $hostDowntime) { $url = ''; if (isset($_SERVER['HTTP_HOST'])) { - $url = $this->getBaseUrl() . '/' . 'main.php?p=210&search_host=' . $hostDowntime['name']; + $url = $this->getBaseUrl().'/'.'main.php?p=210&search_host='.$hostDowntime['name']; } + $dateStart = $this->GMTObject->getDate( + 'Y/m/d H:i', + $hostDowntime['actual_start_time'], + $centreon->user->getMyGMT()); + $hostDowntime['actual_start_time'] = $dateStart; + + $dateEnd = $this->GMTObject->getDate( + 'Y/m/d H:i', + $hostDowntime['end_time'], + $centreon->user->getMyGMT()); + $hostDowntime['end_time'] = $dateEnd; + echo implode($this->delim, array_values($hostDowntime)) . ';' . $url . "\n"; } } @@ -209,11 +224,13 @@ function ($element) { */ public function showSvc($svcList) { + global $centreon; + $fields = array( 'host_name', 'service_name', 'author', - 'start_time', + 'actual_start_time', 'end_time', 'comment_data', 'duration', @@ -240,6 +257,18 @@ function ($arrayElem) { if (isset($_SERVER['HTTP_HOST'])) { $url = $this->getBaseUrl() . '/' . 'main.php?p=210&search_host=' . $hostDowntime['name'] . '&search_service=' . $hostDowntime['description']; } + $dateStart = $this->GMTObject->getDate( + 'Y/m/d H:i', + $hostDowntime['actual_start_time'], + $centreon->user->getMyGMT()); + $hostDowntime['actual_start_time'] = $dateStart; + + $dateEnd = $this->GMTObject->getDate( + 'Y/m/d H:i', + $hostDowntime['end_time'], + $centreon->user->getMyGMT()); + $hostDowntime['end_time'] = $dateEnd; + echo implode($this->delim, array_values($hostDowntime)) . ';' . $url . "\n"; } } From c9178964b0e8b7bd40585d846aa30de98e619116 Mon Sep 17 00:00:00 2001 From: Guillaume28 Date: Tue, 26 Sep 2017 17:12:17 +0200 Subject: [PATCH 13/16] Resolve conflict problem --- .../rest_api/rest_api.postman_collection.json | 159464 +++++++-------- 1 file changed, 79732 insertions(+), 79732 deletions(-) diff --git a/tests/rest_api/rest_api.postman_collection.json b/tests/rest_api/rest_api.postman_collection.json index 6aa86bfd8ff..9e49badae99 100644 --- a/tests/rest_api/rest_api.postman_collection.json +++ b/tests/rest_api/rest_api.postman_collection.json @@ -1,79734 +1,79734 @@ { - "variables": [], - "info": { - "name": "Centreon Web Rest API copy", - "_postman_id": "e687a42e-6678-d1f4-1fcf-14cd2867c15c", - "description": "", - "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" - }, - "item": [ - { - "name": "00-Configure_Poller", - "description": "", - "item": [ - { - "name": "Authenticate", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "postman.setEnvironmentVariable(\"token\",jsonData.authToken);" - ] - } - } - ], - "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" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/x-www-form-urlencoded" - } - ], - "body": { - "mode": "urlencoded", - "urlencoded": [ - { - "key": "username", - "type": "text", - "value": "{{api_user}}" - }, - { - "key": "password", - "type": "text", - "value": "{{api_password}}" - } - ] - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add Instance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"instance\",\n \"values\": \"test_instance;01.02.3.04;42;nagios\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"test_instance;name;{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam localhost", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};localhost;{{instance_localhost}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ns_ip_address", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};ns_ip_address;{{instance_address}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ns_activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};ns_activate;{{instance_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam init_script", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};init_script;{{instance_init_script}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam monitoring_engine", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};monitoring_engine;{{instance_monitoring_engine}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam nagios_bin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};nagios_bin;{{instance_nagios_bin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam nagiostats_bin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};nagiostats_bin;{{instance_nagiostats_bin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam nagios_perfdata", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};nagios_perfdata;{{instance_nagios_perfdata}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ssh_port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};ssh_port;{{instance_ssh_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam centreonbroker_cfg_path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};centreonbroker_cfg_path;{{instance_broker_cfg_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam centreonbroker_module_path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};centreonbroker_module_path;{{instance_broker_module_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List instances", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var instanceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of instances\"] = instanceData;", - " var i = 0;", - " while (i < instanceData.length) {", - " if (postman.getEnvironmentVariable(\"instance_name\") == instanceData[i].name) {", - " tests[\"Body contains added instance\"] = postman.getEnvironmentVariable(\"instance_name\") == instanceData[i].name;", - " tests[\"Body contains added instance_localhost\"] = postman.getEnvironmentVariable(\"instance_localhost\") == instanceData[i].localhost;", - " tests[\"Body contains added instance_address\"] = postman.getEnvironmentVariable(\"instance_address\") == instanceData[i]['ip address'];", - " tests[\"Body contains added instance_activate\"] = postman.getEnvironmentVariable(\"instance_activate\") == instanceData[i].activate;", - " tests[\"Body contains added instance_init_script\"] = postman.getEnvironmentVariable(\"instance_init_script\") == instanceData[i]['init script'];", - " tests[\"Body contains added instance_nagios_bin\"] = postman.getEnvironmentVariable(\"instance_nagios_bin\") == instanceData[i].bin;", - " tests[\"Body contains added instance_nagiostats_bin\"] = postman.getEnvironmentVariable(\"instance_nagiostats_bin\") == instanceData[i]['stats bin'];", - " tests[\"Body contains added instance_ssh_port\"] = postman.getEnvironmentVariable(\"instance_ssh_port\") == instanceData[i]['ssh port'];", - " break;", - " }", - " i++;", - " }", - " if (i == instanceData.length)", - " tests[\"instance_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"instance\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create host2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}};{{host_name2}};0.0.0.0;;central;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create Instance-2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name2}};01.3.04.65;98;nagios\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinstance host", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinstance\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}};{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gethosts", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hostData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of hosts\"] = hostData;", - " var i = 0;", - " while (i < hostData.length) {", - " if (postman.getEnvironmentVariable(\"instance_host\") == hostData[i].name) {", - " break;", - " }", - " i++;", - " }", - " tests[\"Body contains added host\"] = postman.getEnvironmentVariable(\"instance_host\") == hostData[i].generic-active-host;", - " tests[\"Body contains added host_address\"] = postman.getEnvironmentVariable(\"host_address\") == hostData[i]['0.0.0.1'];", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"gethosts\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "01-Configure_Centreon_Engine", - "description": "", - "item": [ - { - "name": "Add resource CFG", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"resourcecfg\",\n \"values\": \"test_resourcecfg;test_value;{{instance_name}};test_comment\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get ressource id", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var resourceData = jsonData.result;", - "", - "try {", - " var i = 0;", - " while (i < resourceData.length) {", - " if (\"$test_resourcecfg$\" == resourceData[i].name) {", - " postman.setEnvironmentVariable(\"resourcecfg_id\",resourceData[i].id);", - " break;", - " }", - " i++;", - " }", - " if (i == resourceData.length)", - " tests[\"the resourcecfg was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"resourcecfg\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};name;{{rcfg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam value", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};value;{{rcfg_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};activate;{{rcfg_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};comment;{{rcfg_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam instance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};instance;{{rcfg_instance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List resource CFG", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var rcfgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of resources CFG\"] = rcfgData;", - " var i = 0;", - " var rcfgname = \"$\"+ postman.getEnvironmentVariable(\"rcfg_name\") + \"$\";", - " while (i < rcfgData.length) {", - " if (rcfgname == rcfgData[i].name) {", - " tests[\"Body contains added resource CFG\"] = rcfgname == rcfgData[i].name;", - " tests[\"Body contains added rcfg_value\"] = postman.getEnvironmentVariable(\"rcfg_value\") == rcfgData[i].value;", - " tests[\"Body contains added rcfg_comment\"] = postman.getEnvironmentVariable(\"rcfg_comment\") == rcfgData[i].comment;", - " tests[\"Body contains added rcfg_activate\"] = postman.getEnvironmentVariable(\"rcfg_activate\") == rcfgData[i].activate;", - " tests[\"Body contains added rcfg_instance\"] = postman.getEnvironmentVariable(\"rcfg_instance\") == rcfgData[i].instance;", - " break;", - " }", - " i++;", - " }", - " if (i == rcfgData.length)", - " tests[\"rcfg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"resourcecfg\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "02-Configure_Centreon_Broker", - "description": "", - "item": [ - { - "name": "Add broker", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"centbrokercfg\",\n \"values\": \"broker_test;{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"broker_test;name;{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List brokers", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var brokerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of brokers\"] = brokerData;", - " var i = 0;", - " while (i < brokerData.length) {", - " if (postman.getEnvironmentVariable(\"broker_name\") == brokerData[i]['config name']) {", - " tests[\"Body contains added broker_name\"] = postman.getEnvironmentVariable(\"broker_name\") == brokerData[i]['config name'];", - " tests[\"Body contains added instance_name\"] = postman.getEnvironmentVariable(\"instance_name\") == brokerData[i].instance;", - " break;", - " }", - " i++;", - " }", - " if (i == brokerData.length)", - " tests[\"broker_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"centbrokercfg\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam filename", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};filename;{{broker_filename}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam instance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};instance;{{instance_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_queue_max_size", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};event_queue_max_size;{{broker_event_queue_max_size}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam cache_directory", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};cache_directory;{{broker_cache_directory}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam daemon", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};daemon;{{broker_daemon}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam stats_activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};stats_activate;{{broker_stats_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam correlation_activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};correlation_activate;{{broker_correlation_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addinput ipv4", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_name_ipv4}};ipv4;1\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get input_key ipv4", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var inputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of inputs\"] = inputData;", - " var i = 0;", - " while (i < inputData.length) {", - " if (postman.getEnvironmentVariable(\"input_name_ipv4\") == inputData[i].name) {", - " postman.setEnvironmentVariable(\"input_ipv4_id\",inputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == inputData.length){", - " tests[\"input_name_ipv4 was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};buffering_timeout;{{input_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};compression;{{input_compression}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression_buffer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};compression_buffer;{{input_compression_buffer}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression_level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};compression_level;{{input_compression_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};retry_interval;{{input_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};category;{{input_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput ca_certificate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};ca_certificate;{{input_ca_certificate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput host", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};host;{{input_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput one_peer_retention_mode", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};one_peer_retention_mode;{{input_one_peer_retention_mode}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};port;{{input_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput private_key", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};private_key;{{input_private_key}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput protocol", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};protocol;{{input_protocol}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput public_cert", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};public_cert;{{input_public_cert}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput tls", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};tls;{{input_tls}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getinput ipv4", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var inputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of inputs\"] = inputData;", - " for (var i = 0; i < inputData.length; i++) {", - " switch (inputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added input_buffering_timeout\"] = postman.getEnvironmentVariable(\"input_buffering_timeout\") == inputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added input_category\"] = postman.getEnvironmentVariable(\"input_category\") == inputData[i]['parameter value'];", - " break;", - " case \"ca_certificate\":", - " tests[\"Body contains added input_ca_certificate\"] = postman.getEnvironmentVariable(\"input_ca_certificate\") == inputData[i]['parameter value'];", - " break;", - " case \"compression\":", - " tests[\"Body contains added input_compression\"] = postman.getEnvironmentVariable(\"input_compression\") == inputData[i]['parameter value'];", - " break;", - " case \"compression_buffer\":", - " tests[\"Body contains added input_compression_buffer\"] = postman.getEnvironmentVariable(\"input_compression_buffer\") == inputData[i]['parameter value'];", - " break;", - " case \"compression_level\":", - " tests[\"Body contains added input_compression_level\"] = postman.getEnvironmentVariable(\"input_compression_level\") == inputData[i]['parameter value'];", - " break;", - " case \"host\":", - " tests[\"Body contains added input_host\"] = postman.getEnvironmentVariable(\"input_host\") == inputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added input_name\"] = postman.getEnvironmentVariable(\"input_name_ipv4\") == inputData[i]['parameter value'];", - " break;", - " case \"one_peer_retention_mode\":", - " tests[\"Body contains added input_one_peer_retention_mode\"] = postman.getEnvironmentVariable(\"input_one_peer_retention_mode\") == inputData[i]['parameter value'];", - " break;", - " case \"port\":", - " tests[\"Body contains added port\"] = postman.getEnvironmentVariable(\"input_port\") == inputData[i]['parameter value'];", - " break;", - " case \"private_key\":", - " tests[\"Body contains added input_private_key\"] = postman.getEnvironmentVariable(\"input_private_key\") == inputData[i]['parameter value'];", - " break;", - " case \"protocol\":", - " tests[\"Body contains added input_protocol\"] = postman.getEnvironmentVariable(\"input_protocol\") == inputData[i]['parameter value'];", - " break;", - " case \"public_cert\":", - " tests[\"Body contains added input_public_cert\"] = postman.getEnvironmentVariable(\"input_public_cert\") == inputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added input_retry_interval\"] = postman.getEnvironmentVariable(\"input_retry_interval\") == inputData[i]['parameter value'];", - " break;", - " case \"tls\":", - " tests[\"Body contains added input_tls\"] = postman.getEnvironmentVariable(\"input_tls\") == intputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body containts added input_type\"] = \"ipv4\" == inputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addinput ipv6", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_name_ipv6}};ipv6;1\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get input_key ipv6", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var inputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of inputs\"] = inputData;", - " var i = 0;", - " while (i < inputData.length) {", - " if (postman.getEnvironmentVariable(\"input_name_ipv6\") == inputData[i].name) {", - " postman.setEnvironmentVariable(\"input_ipv6_id\",inputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == inputData.length){", - " tests[\"input_name_ipv6 was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};buffering_timeout;{{input_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};compression;{{input_compression}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression_buffer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};compression_buffer;{{input_compression_buffer}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression_level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};compression_level;{{input_compression_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};retry_interval;{{input_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};category;{{input_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput ca_certificate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};ca_certificate;{{input_ca_certificate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput host", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};host;{{input_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput one_peer_retention_mode", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};one_peer_retention_mode;{{input_one_peer_retention_mode}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};port;{{input_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput private_key", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};private_key;{{input_private_key}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput protocol", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};protocol;{{input_protocol}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput public_cert", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};public_cert;{{input_public_cert}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput tls", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};tls;{{input_tls}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getinput ipv6", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var inputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of inputs\"] = inputData;", - " for (var i = 0; i < inputData.length; i++) {", - " switch (inputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added input_buffering_timeout\"] = postman.getEnvironmentVariable(\"input_buffering_timeout\") == inputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added input_category\"] = postman.getEnvironmentVariable(\"input_category\") == inputData[i]['parameter value'];", - " break;", - " case \"ca_certificate\":", - " tests[\"Body contains added input_ca_certificate\"] = postman.getEnvironmentVariable(\"input_ca_certificate\") == inputData[i]['parameter value'];", - " break;", - " case \"compression\":", - " tests[\"Body contains added input_compression\"] = postman.getEnvironmentVariable(\"input_compression\") == inputData[i]['parameter value'];", - " break;", - " case \"compression_buffer\":", - " tests[\"Body contains added input_compression_buffer\"] = postman.getEnvironmentVariable(\"input_compression_buffer\") == inputData[i]['parameter value'];", - " break;", - " case \"compression_level\":", - " tests[\"Body contains added input_compression_level\"] = postman.getEnvironmentVariable(\"input_compression_level\") == inputData[i]['parameter value'];", - " break;", - " case \"host\":", - " tests[\"Body contains added input_host\"] = postman.getEnvironmentVariable(\"input_host\") == inputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added input_name\"] = postman.getEnvironmentVariable(\"input_name_ipv6\") == inputData[i]['parameter value'];", - " break;", - " case \"one_peer_retention_mode\":", - " tests[\"Body contains added input_one_peer_retention_mode\"] = postman.getEnvironmentVariable(\"input_one_peer_retention_mode\") == inputData[i]['parameter value'];", - " break;", - " case \"port\":", - " tests[\"Body contains added port\"] = postman.getEnvironmentVariable(\"input_port\") == inputData[i]['parameter value'];", - " break;", - " case \"private_key\":", - " tests[\"Body contains added input_private_key\"] = postman.getEnvironmentVariable(\"input_private_key\") == inputData[i]['parameter value'];", - " break;", - " case \"protocol\":", - " tests[\"Body contains added input_protocol\"] = postman.getEnvironmentVariable(\"input_protocol\") == inputData[i]['parameter value'];", - " break;", - " case \"public_cert\":", - " tests[\"Body contains added input_public_cert\"] = postman.getEnvironmentVariable(\"input_public_cert\") == inputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added input_retry_interval\"] = postman.getEnvironmentVariable(\"input_retry_interval\") == inputData[i]['parameter value'];", - " break;", - " case \"tls\":", - " tests[\"Body contains added input_tls\"] = postman.getEnvironmentVariable(\"input_tls\") == intputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body containts added input_type\"] = \"ipv6\" == inputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addinput file", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_name_file}};file;1\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get input_key file", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var inputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of inputs\"] = inputData;", - " var i = 0;", - " while (i < inputData.length) {", - " if (postman.getEnvironmentVariable(\"input_name_file\") == inputData[i].name) {", - " postman.setEnvironmentVariable(\"input_file_id\",inputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == inputData.length){", - " tests[\"input_name_file was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};buffering_timeout;{{input_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};compression;{{input_compression}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression_buffer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};compression_buffer;{{input_compression_buffer}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput compression_level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};compression_level;{{input_compression_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};retry_interval;{{input_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput protocol", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};protocol;{{input_protocol}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput max_size", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};max_size;{{input_max_size}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinput path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};path;{{input_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getinput file", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var inputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of inputs\"] = inputData;", - " for (var i = 0; i < inputData.length; i++) {", - " switch (inputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added input_buffering_timeout\"] = postman.getEnvironmentVariable(\"input_buffering_timeout\") == inputData[i]['parameter value'];", - " break;", - " case \"compression\":", - " tests[\"Body contains added input_compression\"] = postman.getEnvironmentVariable(\"input_compression\") == inputData[i]['parameter value'];", - " break;", - " case \"compression_buffer\":", - " tests[\"Body contains added input_compression_buffer\"] = postman.getEnvironmentVariable(\"input_compression_buffer\") == inputData[i]['parameter value'];", - " break;", - " case \"compression_level\":", - " tests[\"Body contains added input_compression_level\"] = postman.getEnvironmentVariable(\"input_compression_level\") == inputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added input_name\"] = postman.getEnvironmentVariable(\"input_name_file\") == inputData[i]['parameter value'];", - " break;", - " case \"protocol\":", - " tests[\"Body contains added input_protocol\"] = postman.getEnvironmentVariable(\"input_protocol\") == inputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added input_retry_interval\"] = postman.getEnvironmentVariable(\"input_retry_interval\") == inputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added input_type\"] = \"file\" == inputData[i]['parameter value'];", - " break;", - " case \"max_size\":", - " tests[\"Body contains added input_max_size\"] = postman.getEnvironmentVariable(\"input_max_size\") == inputData[i]['parameter value'];", - " break;", - " case \"path\":", - " tests[\"Body contains added input_path\"] = postman.getEnvironmentVariable(\"input_path\") == inputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addlogger file", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};logger_file_test;file;2\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get logger_key file", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " var i = 0;", - " while (i < loggerData.length) {", - " if (\"logger_file_test\" == loggerData[i].name) {", - " postman.setEnvironmentVariable(\"logger_file_id\",loggerData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == loggerData.length){", - " tests[\"logger_file_test was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger config", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};config;{{logger_config}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger debug", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};debug;{{logger_debug}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger error", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};error;{{logger_error}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};info;{{logger_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};level;{{logger_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger max_size", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};max_size;{{logger_max_size}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};name;{{logger_name_file}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getlogger file", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " for (var i = 0; i < loggerData.length; i++) {", - " switch (loggerData[i]['parameter key'])", - " {", - " case \"config\":", - " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", - " break;", - " case \"debug\":", - " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", - " break;", - " case \"error\":", - " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", - " break;", - " case \"info\":", - " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_file\") == loggerData[i]['parameter value'];", - " break;", - " case \"level\":", - " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added logger_type\"] = \"file\" == loggerData[i]['parameter value'];", - " break;", - " case \"max_size\":", - " tests[\"Body contains added logger_max_size\"] = postman.getEnvironmentVariable(\"logger_max_size\") == loggerData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addlogger standard", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};logger_standard_test;standard;2\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get logger_key standard", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " var i = 0;", - " while (i < loggerData.length) {", - " if (\"logger_standard_test\" == loggerData[i].name) {", - " postman.setEnvironmentVariable(\"logger_standard_id\",loggerData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == loggerData.length){", - " tests[\"logger_standard_test was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger config", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};config;{{logger_config}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger debug", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};debug;{{logger_debug}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger error", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};error;{{logger_error}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};info;{{logger_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};level;{{logger_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};name;{{logger_name_standard}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getlogger standard", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " for (var i = 0; i < loggerData.length; i++) {", - " switch (loggerData[i]['parameter key'])", - " {", - " case \"config\":", - " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", - " break;", - " case \"debug\":", - " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", - " break;", - " case \"error\":", - " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", - " break;", - " case \"info\":", - " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_standard\") == loggerData[i]['parameter value'];", - " break;", - " case \"level\":", - " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added logger_type\"] = \"standard\" == loggerData[i]['parameter value'];", - " break;", - " case \"max_size\":", - " tests[\"Body contains added logger_max_size\"] = postman.getEnvironmentVariable(\"logger_max_size\") == loggerData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addlogger syslog", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_name_syslog}};syslog;2\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get logger_key syslog", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " var i = 0;", - " while (i < loggerData.length) {", - " if (postman.getEnvironmentVariable(\"logger_name_syslog\") == loggerData[i].name) {", - " postman.setEnvironmentVariable(\"logger_syslog_id\",loggerData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == loggerData.length){", - " tests[\"logger_name_syslog was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger config", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};config;{{logger_config}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger debug", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};debug;{{logger_debug}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger error", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};error;{{logger_error}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};info;{{logger_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};level;{{logger_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getlogger syslog", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " for (var i = 0; i < loggerData.length; i++) {", - " switch (loggerData[i]['parameter key'])", - " {", - " case \"config\":", - " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", - " break;", - " case \"debug\":", - " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", - " break;", - " case \"error\":", - " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", - " break;", - " case \"info\":", - " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_syslog\") == loggerData[i]['parameter value'];", - " break;", - " case \"level\":", - " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added logger_type\"] = \"syslog\" == loggerData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addlogger monitoring", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};logger_monitoring_test;monitoring;2\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get logger_key monitoring", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " var i = 0;", - " while (i < loggerData.length) {", - " if (\"logger_monitoring_test\" == loggerData[i].name) {", - " postman.setEnvironmentVariable(\"logger_monitoring_id\",loggerData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == loggerData.length){", - " tests[\"logger_monitoring_test was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger config", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};config;{{logger_config}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger debug", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};debug;{{logger_debug}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger error", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};error;{{logger_error}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};info;{{logger_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};level;{{logger_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setlogger name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};name;{{logger_name_monitoring}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getlogger monitoring", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var loggerData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of loggers\"] = loggerData;", - " for (var i = 0; i < loggerData.length; i++) {", - " switch (loggerData[i]['parameter key'])", - " {", - " case \"config\":", - " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", - " break;", - " case \"debug\":", - " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", - " break;", - " case \"error\":", - " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", - " break;", - " case \"info\":", - " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_monitoring\") == loggerData[i]['parameter value'];", - " break;", - " case \"level\":", - " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added logger_type\"] = \"monitoring\" == loggerData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addoutput ipv4", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_ipv4}};ipv4;4\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get output_key ipv4", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " var i = 0;", - " while (i < outputData.length) {", - " if (postman.getEnvironmentVariable(\"output_name_ipv4\") == outputData[i].name) {", - " postman.setEnvironmentVariable(\"output_ipv4_id\",outputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == outputData.length){", - " tests[\"output_name_ipv4 was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};compression;{{output_compression}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression_buffer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};compression_buffer;{{output_compression_buffer}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression_level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};compression_level;{{output_compression_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput failover", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};failover;{{output_failover}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};retry_interval;{{output_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};category;{{output_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput ca_certificate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};ca_certificate;{{output_ca_certificate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput host", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};host;{{output_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput one_peer_retention_mode", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};one_peer_retention_mode;{{output_one_peer_retention_mode}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};port;{{output_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput private_key", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};private_key;{{output_private_key}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput protocol", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};protocol;{{output_protocol}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput public_cert", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};public_cert;{{output_public_cert}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput tls", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};tls;{{output_tls}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getoutput ipv4", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " for (var i = 0; i < outputData.length; i++) {", - " switch (outputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", - " break;", - " case \"ca_certificate\":", - " tests[\"Body contains added output_ca_certificate\"] = postman.getEnvironmentVariable(\"output_ca_certificate\") == outputData[i]['parameter value'];", - " break;", - " case \"compression\":", - " tests[\"Body contains added output_compression\"] = postman.getEnvironmentVariable(\"output_compression\") == outputData[i]['parameter value'];", - " break;", - " case \"compression_buffer\":", - " tests[\"Body contains added output_compression_buffer\"] = postman.getEnvironmentVariable(\"output_compression_buffer\") == outputData[i]['parameter value'];", - " break;", - " case \"compression_level\":", - " tests[\"Body contains added output_compression_level\"] = postman.getEnvironmentVariable(\"output_compression_level\") == outputData[i]['parameter value'];", - " break;", - " case \"failover\":", - " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", - " break;", - " case \"host\":", - " tests[\"Body contains added output_host\"] = postman.getEnvironmentVariable(\"output_host\") == outputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_ipv4\") == outputData[i]['parameter value'];", - " break;", - " case \"one_peer_retention_mode\":", - " tests[\"Body contains added output_one_peer_retention\"] = postman.getEnvironmentVariable(\"output_one_peer_retention_mode\") == outputData[i]['parameter value'];", - " break;", - " case \"port\":", - " tests[\"Body contains added output_port\"] = postman.getEnvironmentVariable(\"output_port\") == outputData[i]['parameter value'];", - " break;", - " case \"private_key\":", - " tests[\"Body contains added output_private_key\"] = postman.getEnvironmentVariable(\"output_private_key\") == outputData[i]['parameter value'];", - " break;", - " case \"protocol\":", - " tests[\"Body contains added output_protocol\"] = postman.getEnvironmentVariable(\"output_protocol\") == outputData[i]['parameter value'];", - " break;", - " case \"public_cert\":", - " tests[\"Body contains added output_public_cert\"] = postman.getEnvironmentVariable(\"output_public_cert\") == outputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"tls\":", - " tests[\"Body contains added output_tls\"] = postman.getEnvironmentVariable(\"output_tls\") == outputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added output_type\"] = \"ipv4\" == outputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addoutput ipv6", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_ipv6}};ipv6;4\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get output_key ipv6", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " var i = 0;", - " while (i < outputData.length) {", - " if (postman.getEnvironmentVariable(\"output_name_ipv6\") == outputData[i].name) {", - " postman.setEnvironmentVariable(\"output_ipv6_id\",outputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == outputData.length){", - " tests[\"output_name_ipv6 was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};compression;{{output_compression}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression_buffer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};compression_buffer;{{output_compression_buffer}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression_level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};compression_level;{{output_compression_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput failover", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};failover;{{output_failover}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};retry_interval;{{output_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};category;{{output_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput ca_certificate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};ca_certificate;{{output_ca_certificate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput host", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};host;{{output_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput one_peer_retention_mode", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};one_peer_retention_mode;{{output_one_peer_retention_mode}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};port;{{output_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput private_key", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};private_key;{{output_private_key}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput protocol", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};protocol;{{output_protocol}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput public_cert", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};public_cert;{{output_public_cert}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput tls", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};tls;{{output_tls}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getoutput ipv6", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " for (var i = 0; i < outputData.length; i++) {", - " switch (outputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", - " break;", - " case \"ca_certificate\":", - " tests[\"Body contains added output_ca_certificate\"] = postman.getEnvironmentVariable(\"output_ca_certificate\") == outputData[i]['parameter value'];", - " break;", - " case \"compression\":", - " tests[\"Body contains added output_compression\"] = postman.getEnvironmentVariable(\"output_compression\") == outputData[i]['parameter value'];", - " break;", - " case \"compression_buffer\":", - " tests[\"Body contains added output_compression_buffer\"] = postman.getEnvironmentVariable(\"output_compression_buffer\") == outputData[i]['parameter value'];", - " break;", - " case \"compression_level\":", - " tests[\"Body contains added output_compression_level\"] = postman.getEnvironmentVariable(\"output_compression_level\") == outputData[i]['parameter value'];", - " break;", - " case \"failover\":", - " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", - " break;", - " case \"host\":", - " tests[\"Body contains added output_host\"] = postman.getEnvironmentVariable(\"output_host\") == outputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_ipv6\") == outputData[i]['parameter value'];", - " break;", - " case \"one_peer_retention_mode\":", - " tests[\"Body contains added output_one_peer_retention\"] = postman.getEnvironmentVariable(\"output_one_peer_retention_mode\") == outputData[i]['parameter value'];", - " break;", - " case \"port\":", - " tests[\"Body contains added output_port\"] = postman.getEnvironmentVariable(\"output_port\") == outputData[i]['parameter value'];", - " break;", - " case \"private_key\":", - " tests[\"Body contains added output_private_key\"] = postman.getEnvironmentVariable(\"output_private_key\") == outputData[i]['parameter value'];", - " break;", - " case \"protocol\":", - " tests[\"Body contains added output_protocol\"] = postman.getEnvironmentVariable(\"output_protocol\") == outputData[i]['parameter value'];", - " break;", - " case \"public_cert\":", - " tests[\"Body contains added output_public_cert\"] = postman.getEnvironmentVariable(\"output_public_cert\") == outputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"tls\":", - " tests[\"Body contains added output_tls\"] = postman.getEnvironmentVariable(\"output_tls\") == outputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added output_type\"] = \"ipv6\" == outputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addoutput file", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_file}};file;4\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get output_key file", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " var i = 0;", - " while (i < outputData.length) {", - " if (postman.getEnvironmentVariable(\"output_name_file\") == outputData[i].name) {", - " postman.setEnvironmentVariable(\"output_file_id\",outputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == outputData.length){", - " tests[\"output_name_file was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};category;{{output_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};compression;{{output_compression}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression_buffer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};compression_buffer;{{output_compression_buffer}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput compression_level", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};compression_level;{{output_compression_level}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput failover", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};failover;{{output_failover}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};retry_interval;{{output_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput protocol", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};protocol;{{output_protocol}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput max_size", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};max_size;{{output_max_size}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};path;{{output_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getoutput file", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " for (var i = 0; i < outputData.length; i++) {", - " switch (outputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", - " break;", - " case \"compression\":", - " tests[\"Body contains added output_compression\"] = postman.getEnvironmentVariable(\"output_compression\") == outputData[i]['parameter value'];", - " break;", - " case \"compression_buffer\":", - " tests[\"Body contains added output_compression_buffer\"] = postman.getEnvironmentVariable(\"output_compression_buffer\") == outputData[i]['parameter value'];", - " break;", - " case \"compression_level\":", - " tests[\"Body contains added output_compression_level\"] = postman.getEnvironmentVariable(\"output_compression_level\") == outputData[i]['parameter value'];", - " break;", - " case \"max_size\":", - " tests[\"Body contains added output_max_size\"] = postman.getEnvironmentVariable(\"output_max_size\") == outputData[i]['parameter value'];", - " break;", - " case \"failover\":", - " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_file\") == outputData[i]['parameter value'];", - " break;", - " case \"path\":", - " tests[\"Body contains added output_path\"] = postman.getEnvironmentVariable(\"output_path\") == outputData[i]['parameter value'];", - " break;", - " case \"protocol\":", - " tests[\"Body contains added output_protocol\"] = postman.getEnvironmentVariable(\"output_protocol\") == outputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added output_type\"] = \"file\" == outputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addoutput rrd", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_rrd}};rrd;4\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get output_key rrd", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " var i = 0;", - " while (i < outputData.length) {", - " if (postman.getEnvironmentVariable(\"output_name_rrd\") == outputData[i].name) {", - " postman.setEnvironmentVariable(\"output_rrd_id\",outputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == outputData.length){", - " tests[\"output_name_rrd was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};category;{{output_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput failover", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};failover;{{output_failover}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};retry_interval;{{output_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};port;{{output_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};path;{{output_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput metrics_path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};metrics_path;{{output_metrics_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput status_path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};status_path;{{output_status_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput write_metrics", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};write_metrics;{{output_write_metrics}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput write_status", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};write_status;{{output_write_status}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getoutput rrd", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " for (var i = 0; i < outputData.length; i++) {", - " switch (outputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", - " break;", - " case \"failover\":", - " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", - " break;", - " case \"metrics_path\":", - " tests[\"Body contains added output_metrics_path\"] = postman.getEnvironmentVariable(\"output_metrics_path\") == outputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_rrd\") == outputData[i]['parameter value'];", - " break;", - " case \"path\":", - " tests[\"Body contains added output_path\"] = postman.getEnvironmentVariable(\"output_path\") == outputData[i]['parameter value'];", - " break;", - " case \"port\":", - " tests[\"Body contains added output_port\"] = postman.getEnvironmentVariable(\"output_port\") == outputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"status_path\":", - " tests[\"Body contains added output_status_path\"] = postman.getEnvironmentVariable(\"output_status_path\") == outputData[i]['parameter value'];", - " break;", - " case \"store_in_data\":", - " tests[\"Body contains added output_store_in_data\"] = postman.getEnvironmentVariable(\"output_store_in_data_bin\") == outputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added output_type\"] = \"rrd\" == outputData[i]['parameter value'];", - " break;", - " case \"write_metrics\":", - " tests[\"Body contains added output_write_metrics\"] = postman.getEnvironmentVariable(\"output_write_status\") == outputData[i]['parameter value'];", - " break;", - " case \"write_status\":", - " tests[\"Body contains added output_write_status\"] = postman.getEnvironmentVariable(\"output_write_status\") == outputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addoutput storage", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_storage}};storage;4\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get output_key storage", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " var i = 0;", - " while (i < outputData.length) {", - " if (postman.getEnvironmentVariable(\"output_name_storage\") == outputData[i].name) {", - " postman.setEnvironmentVariable(\"output_storage_id\",outputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == outputData.length){", - " tests[\"output_name_storage was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};category;{{output_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput failover", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};failover;{{output_failover}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};retry_interval;{{output_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput check_replication", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};check_replication;{{output_check_replication}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput store_in_data_bin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};store_in_data_bin;{{output_store_in_data_bin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_host", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_host;{{output_db_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_name;{{output_db_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_password", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_password;{{output_db_password}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_port;{{output_db_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_type", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_type;{{output_db_type}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_user", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_user;{{output_db_user}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};interval;{{output_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput length", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};length;{{output_length}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput queries_per_transaction", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};queries_per_transaction;{{output_queries_per_transaction}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput read_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};read_timeout;{{output_read_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput rebuild_check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};rebuild_check_interval;{{output_rebuild_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getoutput storage", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " for (var i = 0; i < outputData.length; i++) {", - " switch (outputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", - " break;", - " case \"check_replication\":", - " tests[\"Body contains added output_check_replication\"] = postman.getEnvironmentVariable(\"output_check_replication\") == outputData[i]['parameter value'];", - " break;", - " case \"db_host\":", - " tests[\"Body contains added output_db_host\"] = postman.getEnvironmentVariable(\"output_db_host\") == outputData[i]['parameter value'];", - " break;", - " case \"db_name\":", - " tests[\"Body contains added output_db_name\"] = postman.getEnvironmentVariable(\"output_db_name\") == outputData[i]['parameter value'];", - " break;", - " case \"db_password\":", - " tests[\"Body contains added output_db_password\"] = postman.getEnvironmentVariable(\"output_db_password\") == outputData[i]['parameter value'];", - " break;", - " case \"db_port\":", - " tests[\"Body contains added output_db_port\"] = postman.getEnvironmentVariable(\"output_db_port\") == outputData[i]['parameter value'];", - " break;", - " case \"db_type\":", - " tests[\"Body contains added output_db_type\"] = postman.getEnvironmentVariable(\"output_db_type\") == outputData[i]['parameter value'];", - " break;", - " case \"db_user\":", - " tests[\"Body contains added output_db_user\"] = postman.getEnvironmentVariable(\"output_db_user\") == outputData[i]['parameter value'];", - " break;", - " case \"failover\":", - " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", - " break;", - " case \"interval\":", - " tests[\"Body contains added output_interval\"] = postman.getEnvironmentVariable(\"output_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_storage\") == outputData[i]['parameter value'];", - " break;", - " case \"queries_per_transaction\":", - " tests[\"Body contains added output_queries_per_transaction\"] =postman.getEnvironmentVariable(\"output_queries_per_transaction\") == outputData[i]['parameter value'];", - " break;", - " case \"read_timeout\":", - " tests[\"Body contains added output_read_timeout\"] = postman.getEnvironmentVariable(\"output_read_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"rebuild_check_interval\":", - " tests[\"Body contains added output_rebuild_check_interval\"] = postman.getEnvironmentVariable(\"output_rebuild_check_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"store_in_data_bin\":", - " tests[\"Body contains added output_store_in_data_bin\"] = postman.getEnvironmentVariable(\"output_store_in_data_bin\") == outputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added output_type\"] = \"storage\" == outputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addoutput sql", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_sql}};sql;4\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get output_key sql", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " var i = 0;", - " while (i < outputData.length) {", - " if (postman.getEnvironmentVariable(\"output_name_sql\") == outputData[i].name) {", - " postman.setEnvironmentVariable(\"output_sql_id\",outputData[i].id)", - " break;", - " }", - " i++;", - " }", - " if (i == outputData.length){", - " tests[\"output_name_sql was found\"] = false;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput buffering_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};category;{{output_category}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput failover", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};failover;{{output_failover}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput retry_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};retry_interval;{{output_retry_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput check_replication", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};check_replication;{{output_check_replication}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput cleanup_check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};cleanup_check_interval;{{output_cleanup_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_host", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_host;{{output_db_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_name;{{output_db_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_password", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_password;{{output_db_password}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_port;{{output_db_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_type", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_type;{{output_db_type}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput db_user", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_user;{{output_db_user}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput instance_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};instance_timeout;{{output_instance_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput queries_per_transaction", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};queries_per_transaction;{{output_queries_per_transaction}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setoutput read_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};read_timeout;{{output_read_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getoutput sql", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var outputData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of outputs\"] = outputData;", - " for (var i = 0; i < outputData.length; i++) {", - " switch (outputData[i]['parameter key'])", - " {", - " case \"buffering_timeout\":", - " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"category\":", - " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", - " break;", - " case \"check_replication\":", - " tests[\"Body contains added output_check_replication\"] = postman.getEnvironmentVariable(\"output_check_replication\") == outputData[i]['parameter value'];", - " break;", - " case \"cleanup_check_interval\":", - " tests[\"Body contains added output_cleanup_check_interval\"] = postman.getEnvironmentVariable(\"output_cleanup_check_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"db_host\":", - " tests[\"Body contains added output_db_host\"] = postman.getEnvironmentVariable(\"output_db_host\") == outputData[i]['parameter value'];", - " break;", - " case \"db_name\":", - " tests[\"Body contains added output_db_name\"] = postman.getEnvironmentVariable(\"output_db_name\") == outputData[i]['parameter value'];", - " break;", - " case \"db_password\":", - " tests[\"Body contains added output_db_password\"] = postman.getEnvironmentVariable(\"output_db_password\") == outputData[i]['parameter value'];", - " break;", - " case \"db_port\":", - " tests[\"Body contains added output_db_port\"] = postman.getEnvironmentVariable(\"output_db_port\") == outputData[i]['parameter value'];", - " break;", - " case \"db_type\":", - " tests[\"Body contains added output_db_type\"] = postman.getEnvironmentVariable(\"output_db_type\") == outputData[i]['parameter value'];", - " break;", - " case \"db_user\":", - " tests[\"Body contains added output_db_user\"] = postman.getEnvironmentVariable(\"output_db_user\") == outputData[i]['parameter value'];", - " break;", - " case \"failover\":", - " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", - " break;", - " case \"instance_timeout\":", - " tests[\"Body contains added output_instance_timeout\"] = postman.getEnvironmentVariable(\"output_instance_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"name\":", - " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_sql\") == outputData[i]['parameter value'];", - " break;", - " case \"queries_per_transaction\":", - " tests[\"Body contains added output_queries_per_transaction\"] =postman.getEnvironmentVariable(\"output_queries_per_transaction\") == outputData[i]['parameter value'];", - " break;", - " case \"read_timeout\":", - " tests[\"Body contains added output_read_timeout\"] = postman.getEnvironmentVariable(\"output_read_timeout\") == outputData[i]['parameter value'];", - " break;", - " case \"retry_interval\":", - " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", - " break;", - " case \"type\":", - " tests[\"Body contains added output_type\"] = \"sql\" == outputData[i]['parameter value'];", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gettypelist", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"gettypelist\",\n \"object\": \"centbrokercfg\",\n \"values\": \"output\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getfieldlist", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getfieldlist\",\n \"object\": \"centbrokercfg\",\n \"values\": \"ipv4\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "10-Timeperiods", - "description": "", - "item": [ - { - "name": "Add tp", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"tp\",\n \"values\": \"test_name;test_alias\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"test_name;name;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};alias;{{tp_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam sunday", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam monday", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam tuesday", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam wednesday", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam thursday", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam friday", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam include", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};include;{{tp_include}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam exclude", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};exclude;{{tp_exclude}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List timeperiod", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var tpData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of time periods\"] = tpData;", - " var i = 0;", - " while (i < tpData.length) {", - " if (postman.getEnvironmentVariable(\"tp_name\") == tpData[i].name) {", - " tests[\"Body contains added name\"] = postman.getEnvironmentVariable(\"tp_name\") == tpData[i].name;", - " tests[\"Body contains added alias\"] = postman.getEnvironmentVariable(\"tp_alias\") == tpData[i].alias;", - " tests[\"Body contains added sunday\"] = postman.getEnvironmentVariable(\"tp_sunday\") == tpData[i].sunday;", - " tests[\"Body contains added monday\"] = postman.getEnvironmentVariable(\"tp_monday\") == tpData[i].monday;", - " tests[\"Body contains added tuesday\"] = postman.getEnvironmentVariable(\"tp_tuesday\") == tpData[i].tuesday;", - " tests[\"Body contains added wednesday\"] = postman.getEnvironmentVariable(\"tp_wednesday\") == tpData[i].wednesday;", - " tests[\"Body contains added thursday\"] = postman.getEnvironmentVariable(\"tp_thursday\") == tpData[i].thursday;", - " tests[\"Body contains added friday\"] = postman.getEnvironmentVariable(\"tp_friday\") == tpData[i].friday;", - " tests[\"Body contains added saturday\"] = postman.getEnvironmentVariable(\"tp_saturday\") == tpData[i].saturday;", - " break;", - " }", - " i++;", - " }", - " if (i == tpData.length)", - " tests[\"tp_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"tp\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Set exception", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setexception\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}};{{exception_day}};{{exception_timerange}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get exceptions", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var exceptionData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of exceptions\"] = exceptionData;", - " var i = 0;", - " while (i < exceptionData.length) {", - " if (postman.getEnvironmentVariable(\"exception_day\") == exceptionData[i].days) {", - " tests[\"Body contains added exception day\"] = postman.getEnvironmentVariable(\"exception_day\") == exceptionData[i].days;", - " tests[\"Body contains added exception timerange\"] = postman.getEnvironmentVariable(\"exception_timerange\") == exceptionData[i].timerange;", - " break;", - " }", - " i++;", - " }", - " if (i == tpData.length)", - " tests[\"tp_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getexception\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del exception", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delexception\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}};{{exception_day}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "11-Commands", - "description": "Tests all commands to manage commands.", - "item": [ - { - "name": "Add 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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"cmd\",\n \"values\": \"cmd-test;misc;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"cmd-test;name;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam line", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};line;{{command_line}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam type", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};type;{{command_type}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam graph", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};graph;{{command_graph}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam example", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};example;{{command_example}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};comment;{{command_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List commands", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var commandData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of commands\"] = commandData;", - " var i = 0;", - " while (i < commandData.length) {", - " if (postman.getEnvironmentVariable(\"command_name\") == commandData[i].name) {", - " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == commandData[i].name;", - " tests[\"Body contains added command_type\"] = postman.getEnvironmentVariable(\"command_type\") == commandData[i].type;", - " tests[\"Body contains added command_line\"] = postman.getEnvironmentVariable(\"command_line\") == commandData[i].line;", - " break;", - " }", - " i++;", - " }", - " if (i == commandData.length)", - " tests[\"command_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"cmd\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "20-Contacts templates", - "description": "Tests all commands to manage contact.", - "item": [ - { - "name": "Add ctpl", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"contacttpl\",\n \"values\": \"test_name;test_alias;test@localhost;pwd;0;0;en_US;Idap\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"test_alias;name;{{ctpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"test_alias;alias;{{ctpl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};comment;{{ctpl_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam hostnotifcmd", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};hostnotifcmd;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam svcnotifcmd", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};svcnotifcmd;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam hostnotifperiod", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};hostnotifperiod;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam svcnotifperiod", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};svcnotifperiod;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam hostnotifopt", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};hostnotifopt;{{contact_hostnotifopt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam svcnotifopt", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};servicenotifopt;{{contact_svcnotifopt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address1", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address1;{{contact_address1}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address2;{{contact_address2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address3", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address3;{{contact_address3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address4", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address4;{{contact_address4}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address5", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address5;{{contact_address5}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address6", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address6;{{contact_address6}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create ctpl2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_name2}};{{ctpl_alias2}};test@localhost;pwd;0;0;en_US;Idap\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam template", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};template;{{ctpl_alias2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Enable", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"enable\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Disable", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"disable\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "21-Contacts", - "description": "Tests all commands to manage contact.", - "item": [ - { - "name": "Add contact", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"contact\",\n \"values\": \"test_name;test_alias;test@localhost;pwd;0;0;en_US;Idap\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"test_alias;name;{{contact_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"test_alias;alias;{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};comment;{{contact_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam mail", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};email;{{contact_mail}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam password", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};password;{{contact_pwd}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};access;{{contact_access}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam language", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};language;{{contact_language}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam GUI access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};access;{{contact_GUI_access}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam admin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;{{contact_admin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam authtype", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};authtype;{{contact_authentication}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam hostnotifcmd", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifcmd;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam svcnotifcmd", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifcmd;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam hostnotifperiod", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifperiod;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam svcnotifperiod", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifperiod;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam hostnotifopt", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam svcnotifopt", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam address1", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address1;{{contact_address1}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address2;{{contact_address2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address3", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address3;{{contact_address3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address4", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address4;{{contact_address4}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address5", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address5;{{contact_address5}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address6", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address6;{{contact_address6}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_dn", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};ldap_dn;{{contact_ldap_dn}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam autologin_key", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};autologin_key;{{contact_autologin_key}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam template", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};template;{{ctpl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"enable\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Disable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"disable\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List contact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_name\") == contactData[i].name) {", - " tests[\"Body contains added contact_name\"] = postman.getEnvironmentVariable(\"contact_name\") == contactData[i].name;", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].alias;", - " tests[\"Body contains added contact_email\"] = postman.getEnvironmentVariable(\"contact_mail\") == contactData[i].email;", - " tests[\"Body contains added contact_GUI_access\"] = postman.getEnvironmentVariable(\"contact_GUI_access\") == contactData[i]['gui access'];", - " tests[\"Body contains added contact_admin\"] = postman.getEnvironmentVariable(\"contact_admin\") == contactData[i].admin;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"contact\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Set contact non admin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;0\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create contact-2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"contact\",\n \"values\": \"{{contact_name2}};{{contact_alias2}};test@localhost;pwd;0;0;en_US;Idap\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Set contact non admin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;0\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "22-Contactgroups", - "description": "Tests all commands to manage contact groups.", - "item": [ - { - "name": "Add contact group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"cg\",\n \"values\": \"test_name;test_alias\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cg\",\n \"values\": \"test_name;name;{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};alias;{{cg_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"enable\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Disable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"disable\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", - " {", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_alias was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;", - "" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List contact group", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name)", - " {", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " tests[\"Body contains added cg_alias\"] = postman.getEnvironmentVariable(\"cg_alias\") == cgData[i].alias;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"cg\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "30-Hosts_Templates", - "description": "", - "item": [ - { - "name": "Create host template2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name2}};{{htpl_name2}};0.0.0.0;;central;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add htpl", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"test_host;test_host;0.0.0.0;{{htpl_name2}};central;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"test_host;name;{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam 2d_coords", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};2d_coords;{{host_2d_coords}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam 3d_coords", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};3d_coords;{{host_3d_coords}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam action_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};action_url;{{host_action_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};activate;{{host_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam active_checks_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};active_checks_enabled;{{host_active_checks_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};address;{{host_address}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};alias;{{host_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List hosts", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hostData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of hosts\"] = hostData;", - " var i = 0;", - " while (i < hostData.length) {", - " if (postman.getEnvironmentVariable(\"htpl_name\") == hostData[i].name) {", - " tests[\"Body contains added host\"] = postman.getEnvironmentVariable(\"htpl_name\") == hostData[i].name;", - " tests[\"Body contains added host_alias\"] = postman.getEnvironmentVariable(\"host_alias\") == hostData[i].alias;", - " tests[\"Body contains added host_address\"] = postman.getEnvironmentVariable(\"host_address\") == hostData[i].address;", - " tests[\"Body contains added host_activate\"] = postman.getEnvironmentVariable(\"host_activate\") == hostData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == hostData.length)", - " tests[\"htpl_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"show\",\n \"object\":\"htpl\"\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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_command;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_command_arguments", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_command_arguments;{{command_example}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_interval;{{host_normal_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_freshness", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_freshness;{{host_check_freshness}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_period;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};checks_enabled;{{host_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam contact_additive_inheritance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};contact_additive_inheritance;{{host_contact_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam cg_additive_inheritance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};cg_additive_inheritance;{{host_cg_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};event_handler;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_arg", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};event_handler_arguments;{{command_example}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};event_handler_enabled;{{host_event_handler_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam first_notification_delay", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};first_notification_delay;{{host_first_notif_delay}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam flap_detection_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};flap_detection_enabled;{{host_flap_detect_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam host_low_flap_threshold", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};host_low_flap_threshold;{{host_low_flap}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam host_high_flap_threshold", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};host_high_flap_threshold;{{host_high_flap}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam flap_detection_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};flap_detection_options;{{host_flap_detect_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};icon_image;{{host_icon_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image_alt", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};icon_image_alt;{{host_icon_image_alt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam max_check_attempts", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam notes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notes;{{host_notes}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notes_url;{{host_notes_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notifications_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notifications_enabled;{{host_notif_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notification_interval;{{host_notif_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notification_options;{{host_notif_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notification_period;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam recovery_notif_delay", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};recovery_notification_delay;{{host_recovery_notif_delay}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam obsess_over_host", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};obsess_over_host;{{host_obsess_over_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam passive_checks_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};passive_checks_enabled;{{host_passive_checks_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam process_perf_data", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};process_perf_data;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_status_info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};retain_status_information;{{host_retain_status_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_nonstatus_info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};retain_nonstatus_information;{{host_retain_nonstatus_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retry_check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};retry_check_interval;{{host_retry_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam snmp_community", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam snmp_version", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": "Setparam stalking_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};stalking_options;{{host_stalking_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam statusmap_image", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};statusmap_image;{{host_statusmap_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam host_notif_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};host_notification_options;{{host_notification_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam timezone", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};timezone;{{host_timezone}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmacro", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setmacro\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{host_macro_name}};{{host_macro_value}};{{host_is_password}};{{host_macro_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmacro", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var macroData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of macros\"] = macroData;", - " var i = 0;", - " while (i < macroData.length) {", - " if (postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name']) {", - " tests[\"Body contains added macro\"] = postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name'];", - " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"host_macro_value\") == macroData[i]['macro value'];", - " tests[\"Body contains added macro_is_password\"] = postman.getEnvironmentVariable(\"host_is_password\") == macroData[i].is_password;", - " tests[\"Body contains added macro_description\"] = postman.getEnvironmentVariable(\"host_macro_description\") == macroData[i].description;", - " break;", - " }", - " i++;", - " }", - " if (i == macroData.length)", - " tests[\"host_macro_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getmacro\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmacro", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"delmacro\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{host_macro_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create host template3", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name3}};test_host;0.0.0.0;;central;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addtemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"addtemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deltemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"deltemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Settemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"settemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gettemplate", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var templateData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of templates\"] = templateData;", - " var i = 0;", - " while (i < templateData.length) {", - " if (postman.getEnvironmentVariable(\"htpl_name3\") == templateData[i].name) {", - " tests[\"Body contains added htpl_name3\"] = postman.getEnvironmentVariable(\"htpl_name3\") == templateData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == templateData.length)", - " tests[\"htpl_name3 was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"gettemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addparent\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delparent\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparent\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getparent", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var parentData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of parents\"] = parentData;", - " var i = 0;", - " while (i < parentData.length) {", - " if (postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name) {", - " tests[\"Body contains added host_name2\"] = postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == parentData.length)", - " tests[\"host_name2 was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getparent\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontactgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getcontactgroup\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_alias was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getcontact\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add host group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"test_name;test_alias\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"test_name;name;{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gethostgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = hgData;", - " var i = 0;", - " while (i < hgData.length) {", - " if (postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name) {", - " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == hgData.length)", - " tests[\"hg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"gethostgroup\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add host category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Set hc 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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setseverity", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Unsetseverity", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"enable\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Disable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"disable\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "31-Hosts", - "description": "Tests all commands to manage hosts", - "item": [ - { - "name": "Add host", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"test_host;test_host;0.0.0.0;{{htpl_name}};central;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"test_host;name;{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam 2d_coords", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};2d_coords;{{host_2d_coords}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam 3d_coords", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};3d_coords;{{host_3d_coords}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam action_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};action_url;{{host_action_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};activate;{{host_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam active_checks_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};active_checks_enabled;{{host_active_checks_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam address", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};address;{{host_address}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};alias;{{host_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List hosts", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hostData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of hosts\"] = hostData;", - " var i = 0;", - " while (i < hostData.length) {", - " if (postman.getEnvironmentVariable(\"host_name\") == hostData[i].name) {", - " tests[\"Body contains added host\"] = postman.getEnvironmentVariable(\"host_name\") == hostData[i].name;", - " tests[\"Body contains added host_alias\"] = postman.getEnvironmentVariable(\"host_alias\") == hostData[i].alias;", - " tests[\"Body contains added host_address\"] = postman.getEnvironmentVariable(\"host_address\") == hostData[i].address;", - " tests[\"Body contains added host_activate\"] = postman.getEnvironmentVariable(\"host_activate\") == hostData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == hostData.length)", - " tests[\"host_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"show\",\n \"object\":\"host\"\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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_command;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_command_arguments", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_command_arguments;{{command_example}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_interval;{{host_normal_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_freshness", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_freshness;{{host_check_freshness}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_period;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};checks_enabled;{{host_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam contact_additive_inheritance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};contact_additive_inheritance;{{host_contact_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam cg_additive_inheritance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};cg_additive_inheritance;{{host_cg_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};event_handler;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_arg", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};event_handler_arguments;{{command_example}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};event_handler_enabled;{{host_event_handler_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam first_notification_delay", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};first_notification_delay;{{host_first_notif_delay}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam flap_detection_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};flap_detection_enabled;{{host_flap_detect_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam host_low_flap_threshold", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};host_low_flap_threshold;{{host_low_flap}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam host_high_flap_threshold", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};host_high_flap_threshold;{{host_high_flap}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam flap_detection_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};flap_detection_options;{{host_flap_detect_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};icon_image;{{host_icon_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image_alt", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};icon_image_alt;{{host_icon_image_alt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam max_check_attempts", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};max_check_attempts;{{host_max_check_attempts}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notes;{{host_notes}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notes_url;{{host_notes_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notifications_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notifications_enabled;{{host_notif_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notification_interval;{{host_notif_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notification_options;{{host_notif_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notification_period;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam recovery_notif_delay", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};recovery_notification_delay;{{host_recovery_notif_delay}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam obsess_over_host", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};obsess_over_host;{{host_obsess_over_host}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam passive_checks_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};passive_checks_enabled;{{host_passive_checks_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam process_perf_data", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};process_perf_data;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_status_info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};retain_status_information;{{host_retain_status_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_nonstatus_info", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};retain_nonstatus_information;{{host_retain_nonstatus_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retry_check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};retry_check_interval;{{host_retry_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam snmp_community", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};snmp_community;{{host_snmp_community}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam snmp_version", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};snmp_version;{{host_snmp_version}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam stalking_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};stalking_options;{{host_stalking_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam statusmap_image", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};statusmap_image;{{host_statusmap_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam host_notif_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};host_notification_options;{{host_notification_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam timezone", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};timezone;{{host_timezone}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setinstance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setinstance\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmacro", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"setmacro\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{host_macro_name}};{{host_macro_value}};{{host_is_password}};{{host_macro_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmacro", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var macroData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of macros\"] = macroData;", - " var i = 0;", - " while (i < macroData.length) {", - " if (postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name']) {", - " tests[\"Body contains added macro\"] = postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name'];", - " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"host_macro_value\") == macroData[i]['macro value'];", - " tests[\"Body contains added macro_is_password\"] = postman.getEnvironmentVariable(\"host_is_password\") == macroData[i].is_password;", - " tests[\"Body contains added macro_description\"] = postman.getEnvironmentVariable(\"host_macro_description\") == macroData[i].description;", - " break;", - " }", - " i++;", - " }", - " if (i == macroData.length)", - " tests[\"host_macro_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getmacro\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmacro", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"delmacro\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{host_macro_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addtemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"addtemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deltemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"deltemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Settemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"settemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gettemplate", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var templateData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of templates\"] = templateData;", - " var i = 0;", - " while (i < templateData.length) {", - " if (postman.getEnvironmentVariable(\"htpl_name\") == templateData[i].name) {", - " tests[\"Body contains added htpl_name\"] = postman.getEnvironmentVariable(\"htpl_name\") == templateData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == templateData.length)", - " tests[\"host_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"gettemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Applytpl", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"applytpl\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addparent\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delparent\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparent\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getparent", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var parentData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of parents\"] = parentData;", - " var i = 0;", - " while (i < parentData.length) {", - " if (postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name) {", - " tests[\"Body contains added parent\"] = postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == parentData.length)", - " tests[\"host_name2 was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getparent\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontactgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getcontactgroup\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_alias was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getcontact\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gethostgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = hgData;", - " var i = 0;", - " while (i < hgData.length) {", - " if (postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name) {", - " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == hgData.length)", - " tests[\"hg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"gethostgroup\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setseverity", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Unsetseverity", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"enable\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Disable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"disable\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "32-Hostgroups", - "description": "Tests all commands to manage host groups.", - "item": [ - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};alias;{{hg_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};comment;{{hg_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};activate;{{hg_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};notes;{{hg_notes}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};notes_url;{{hg_notes_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam action_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};action_url;{{hg_action_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};icon_image;{{hg_icon_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam map_icon_image", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};map_icon_image;{{hg_map_icon_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List host groups", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of host categories\"] = hgData;", - " var i = 0;", - " while (i < hgData.length) {", - " if (postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name)", - " {", - " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name;", - " tests[\"Body contains added hg_alias\"] = postman.getEnvironmentVariable(\"hg_alias\") == hgData[i].alias;", - " break;", - " }", - " i++;", - " }", - " if (i == hgData.length)", - " tests[\"hg_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"hg\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addmember", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmenber", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmember", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmember", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hg_member_Data = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of host group members\"] = hg_member_Data;", - " var i = 0;", - " while (i < hg_member_Data.length) {", - " if (postman.getEnvironmentVariable(\"host_name\") == hg_member_Data[i].name)", - " {", - " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == hg_member_Data[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == hg_member_Data.length)", - " tests[\"host_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "33-Hosts_Categories", - "description": "Tests all commands to manage host categories.", - "item": [ - { - "name": "Addmember", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmember", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmember", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{host_name}}|{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmember", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hc_member_Data = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of host category members\"] = hc_member_Data;", - " var i = 0;", - " while (i < hc_member_Data.length) {", - " if (postman.getEnvironmentVariable(\"host_name\") == hc_member_Data[i].name)", - " {", - " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == hc_member_Data[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == hc_member_Data.length)", - " {", - " tests[\"host_name was found\"] = false;", - " }", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Unsetseverity", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List host categories", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hcData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of host categories\"] = hcData;", - " var i = 0;", - " while (i < hcData.length) {", - " if (postman.getEnvironmentVariable(\"hc_name\") == hcData[i].name)", - " {", - " tests[\"Body contains added hc_name\"] = postman.getEnvironmentVariable(\"hc_name\") == hcData[i].name;", - " tests[\"Body contains added hc_alias\"] = postman.getEnvironmentVariable(\"hc_alias\") == hcData[i].alias;", - " break;", - " }", - " i++;", - " }", - " if (i == hcData.length)", - " tests[\"hc_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"hc\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "40-Services_Templates", - "description": "Tests all commands to manage service templates.", - "item": [ - { - "name": "Add service template", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"stpl\",\n \"values\": \"test_stpl;stpl_alias;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam description", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"test_stpl;description;{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};activate;{{stpl_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};alias;{{stpl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create service template-2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description2}};test_alias;{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam template", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};template;{{stpl_description2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam is_volatile", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};is_volatile;{{stpl_is_volatile}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_command;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_command_arguments", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_command_arguments;{{command_argument}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam max_check_attempts", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setparam normal_check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};normal_check_interval;{{stpl_normal_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retry_check_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};retry_check_interval;{{stpl_retry_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam active_checks_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};active_checks_enabled;{{stpl_active_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam passive_checks_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};passive_checks_enabled;{{stpl_passive_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam contact_additive_inheritance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};contact_additive_inheritance;{{stpl_contact_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam cg_additive_inheritance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};cg_additive_inheritance;{{stpl_cg_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_interval", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notification_interval;{{stpl_notification_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notification_period;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notification_options;{{stpl_notif_option}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam first_notification_delay", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};first_notification_delay;{{stpl_first_notif_delay}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam parallelize_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};parallelize_check;{{stpl_parallelize_checks}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam obsess_over_service", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};obsess_over_service;{{stpl_obsess_over_service}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_freshness", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_freshness;{{stpl_check_freshness}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam freshness_threshold", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};freshness_threshold;{{stpl_freshness_threshold}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};event_handler_enabled;{{stpl_event_handler_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam flap_detection_enabled", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};flap_detection_enabled;{{stpl_flap_detection_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam process_perf_data", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};process_perf_data;{{stpl_process_perf_data}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_status_informations", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};retain_status_information;{{stpl_retain_status_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_nonstatus_informations", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};retain_nonstatus_information;{{stpl_retain_nonstatus_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam stalking_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};stalking_options;{{stpl_stalking_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};event_handler;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_arguments", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};event_handler_arguments;{{stpl_event_handler_arg}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notes;{{stpl_notes}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notes_url;{{stpl_notes_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam action_url", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};action_url;{{stpl_action_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};icon_image;{{stpl_icon_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image_alt", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};icon_image_alt;{{stpl_icon_image_alt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam graphtemplate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};graphtemplate;{{stpl_graph_tpl}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};comment;{{stpl_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam service_notif_options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};service_notification_options;{{stpl_notif_options}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List service templates", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var stplData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of service templates\"] = stplData;", - " var i = 0;", - " while (i < stplData.length) {", - " if (postman.getEnvironmentVariable(\"stpl_description\") == stplData[i].description)", - " {", - " tests[\"Body contains added service template\"] = postman.getEnvironmentVariable(\"stpl_description\") == stplData[i].description;", - " tests[\"Body contains added alias\"] = postman.getEnvironmentVariable(\"stpl_alias\") == stplData[i].alias;", - " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == stplData[i]['check command'];", - " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == stplData[i]['check command arg'];", - " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"stpl_normal_check_interval\") == stplData[i]['normal check interval'];", - " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"stpl_retry_check_interval\") == stplData[i]['retry check interval'];", - " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"stpl_max_check\") == stplData[i]['max check attempts'];", - " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"stpl_active_check_enabled\") == stplData[i]['active checks enabled'];", - " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"stpl_passive_check_enabled\") == stplData[i]['passive checks enabled'];", - " break;", - " }", - " i++;", - " }", - " if (i == stplData.length)", - " tests[\"stpl_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"stpl\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhosttemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhosttemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethosttemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}|{{htpl_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmacro", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{stpl_macro_name}};{{stpl_macro_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmacro", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var macroData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of macros\"] = macroData;", - " var i = 0;", - " while (i < macroData.length) {", - " if (postman.getEnvironmentVariable(\"stpl_macro_value\") == macroData[i]['macro value']){", - " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"stpl_macro_value\") == macroData[i]['macro value'];", - " break;", - " }", - " i++;", - " }", - " if (i == macroData.length)", - " tests[\"stpl_macro_value was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmacro", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delmacro\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{stpl_macro_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}|{{contact_alias2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name){", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_alias was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontactgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name){", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add trap", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"trap\",\n \"values\": \"test_name;test_OID\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"test_name;name;{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Settrap", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"settrap\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gettrap", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var trapData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of traps\"] = trapData;", - " var i = 0;", - " while (i < trapData.length) {", - " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name){", - " tests[\"Body contains added trap_name\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == trapData.length)", - " tests[\"trap_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"gettrap\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deltrap", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deltrap\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "41-Services", - "description": "Tests all commands to manage services.", - "item": [ - { - "name": "Add service", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};service_test;{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam description", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};service_test;description;{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};activate;{{service_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam template", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};template;{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam is_volatile", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};is_volatile;{{service_is_volatile}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};check_command;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_command_arguments", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};check_command_arguments;{{command_argument}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam max_check_attempts", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};max_check_attempts;{{service_max_check_attempts}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam normal_check_interval", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};normal_check_interval;{{service_normal_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retry_check_interval", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};retry_check_interval;{{service_retry_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam active_checks_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};active_checks_enabled;{{service_active_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam passive_checks_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};passive_checks_enabled;{{service_passive_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam contact_additive_inheritance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};contact_additive_inheritance;{{service_contact_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam cg_additive_inheritance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};cg_additive_inheritance;{{service_cg_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notifications_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notifications_enabled;{{service_notifications_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam contact_additive_inheritance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};contact_additive_inheritance;{{service_contact_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam cg_additive_inheritance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};cg_additive_inheritance;{{service_cg_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_interval", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notification_interval;{{service_notif_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notification_period;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_options", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notification_options;{{service_notif_option}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam first_notification_delay", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};first_notification_delay;{{service_first_notif_delay}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam parallelize_check", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};parallelize_check;{{service_parallelize_checks}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam obsess_over_service", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};obsess_over_service;{{service_obsess_over_service}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_freshness", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};check_freshness;{{service_check_freshness}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam freshness_threshold", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};freshness_threshold;{{service_freshness_threshold}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};event_handler_enabled;{{service_event_handler_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam flap_detection_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};flap_detection_enabled;{{service_flap_detection_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam service_low_flap_threshold", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};service_low_flap_threshold;{{service_low_flap}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam service_high_flap_threshold", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};service_high_flap_threshold;{{service_high_flap}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam process_perf_data", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};process_perf_data;{{service_process_perf_data}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_status_informations", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};retain_status_information;{{service_retain_status_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_nonstatus_informations", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};retain_nonstatus_information;{{service_retain_nonstatus_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};event_handler;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_arguments", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};event_handler_arguments;{{service_event_handler_arg}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notes;{{service_notes}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes_url", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notes_url;{{service_notes_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam action_url", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};action_url;{{service_action_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};icon_image;{{service_icon_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image_alt", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};icon_image_alt;{{service_icon_image_alt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};comment;{{service_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam service_notif_options", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};service_notification_options;{{service_notif_option}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List service", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serviceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of services\"] = serviceData;", - " var i = 0;", - " while (i < serviceData.length) {", - " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i].description)", - " {", - " tests[\"Body contains added service\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i].description;", - " tests[\"Body contains added host name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", - " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == serviceData[i]['check command'];", - " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == serviceData[i]['check command arg'];", - " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"service_normal_check_interval\") == serviceData[i]['normal check interval'];", - " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"service_retry_check_interval\") == serviceData[i]['retry check interval'];", - " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"service_max_check_attempts\") == serviceData[i]['max check attempts'];", - " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"service_active_check_enabled\") == serviceData[i]['active checks enabled'];", - " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"service_passive_check_enabled\") == serviceData[i]['passive checks enabled'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"service_host was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"service\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhost", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhost\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhost", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhost\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethost-2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethost\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethost", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethost\",\n \"object\": \"service\",\n \"values\": \"{{host_name2}};{{service_description}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmacro", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{service_macro_name}};{{service_macro_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmacro", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var macroData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of macros\"] = macroData;", - " var i = 0;", - " while (i < macroData.length) {", - " if (postman.getEnvironmentVariable(\"service_macro_name\") == macroData[i]['macro name'])", - " {", - " tests[\"Body contains added macro_name\"] = postman.getEnvironmentVariable(\"service_macro_name\") == macroData[i]['macro name'];", - " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"service_macro_value\") == macroData[i]['macro value'];", - " break;", - " }", - " i++;", - " }", - " if (i == macroData.length)", - " tests[\"service_macro_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmacro", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delmacro\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{service_macro_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add service categories", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"sc\",\n \"values\": \"sc_test;description_test\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sc\",\n \"values\": \"sc_test;name;{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setseverity", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Unsetseverity", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Resetseverity", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "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": [] - }, - { - "name": "Setseverity", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Unsetseverity", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of conctacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", - " {", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_alias was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontactgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of conctact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name){", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addtrap", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addtrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deltrap", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deltrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Settrap", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"settrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gettrap", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var trapData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of traps\"] = trapData;", - " var i = 0;", - " while (i < trapData.length) {", - " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name)", - " {", - " tests[\"Body contains added trap_name\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == trapData.length)", - " tests[\"trap_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"gettrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "42-Service_by_Hostgroups", - "description": "Tests all commands to manage services on host group.", - "item": [ - { - "name": "Add hgservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};hgservice_test;{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam description", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};hgservice_test;description;{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};activate;{{hgservice_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam template", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};template;{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam is_volatile", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};is_volatile;{{hgservice_is_volatile}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_command;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_command_arguments", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_command_arguments;{{command_argument}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam max_check_attempts", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};max_check_attempts;{{hgservice_max_check_attempts}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam normal_check_interval", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};normal_check_interval;{{hgservice_normal_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retry_check_interval", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retry_check_interval;{{hgservice_retry_check_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam active_checks_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};active_checks_enabled;{{hgservice_active_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam passive_checks_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};passive_checks_enabled;{{hgservice_passive_check_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam contact_additive_inheritance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};contact_additive_inheritance;{{hgservice_contact_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam cg_additive_inheritance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};cg_additive_inheritance;{{hgservice_cg_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notifications_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notifications_enabled;{{hgservice_notifications_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_interval", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_interval;{{hgservice_notif_interval}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_period", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_period;{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notification_options", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_options;{{hgservice_notif_option}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam first_notification_delay", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};first_notification_delay;{{hgservice_first_notif_delay}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam parallelize_check", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};parallelize_check;{{hgservice_parallelize_checks}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam obsess_over_service", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};obsess_over_service;{{hgservice_obsess_over_service}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam check_freshness", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_freshness;{{hgservice_check_freshness}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam freshness_threshold", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};freshness_threshold;{{hgservice_freshness_threshold}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_enabled;{{hgservice_event_handler_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam flap_detection_enabled", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};flap_detection_enabled;{{hgservice_flap_detection_enabled}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam process_perf_data", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};process_perf_data;{{hgservice_process_perf_data}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_status_informations", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_status_information;{{hgservice_retain_status_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam retain_nonstatus_informations", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_nonstatus_information;{{hgservice_retain_nonstatus_info}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam event_handler_arguments", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_arguments;{{hgservice_event_handler_arg}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes;{{hgservice_notes}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notes_url", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes_url;{{hgservice_notes_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam action_url", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};action_url;{{hgservice_action_url}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image;{{hgservice_icon_image}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam icon_image_alt", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image_alt;{{hgservice_icon_image_alt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};comment;{{hgservice_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam service_notif_options", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};service_notification_options;{{hg_notif_option}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List service", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serviceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of host group services\"] = serviceData;", - " var i = 0;", - " while (i < serviceData.length) {", - " if (postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description)", - " {", - " tests[\"Body contains added hgservice\"] = postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description;", - " tests[\"Body contains added hgservice_hg\"] = postman.getEnvironmentVariable(\"hg_name\") == serviceData[i]['hg name'];", - " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == serviceData[i]['check command'];", - " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == serviceData[i]['check command arg'];", - " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"hgservice_normal_check_interval\") == serviceData[i]['normal check interval'];", - " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"hgservice_retry_check_interval\") == serviceData[i]['retry check interval'];", - " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"hgservice_max_check_attempts\") == serviceData[i]['max check attempts'];", - " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_active_check_enabled\") == serviceData[i]['active checks enabled'];", - " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_passive_check_enabled\") == serviceData[i]['passive checks enabled'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"hgservice_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"hgservice\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create hg-2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name2}};{{hg_name2}};0.0.0.0;;central;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethostgroup-2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name2}};{{hgservice_description}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmacro", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hgservice_macro_name}};{{hgservice_macro_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmacro", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var macroData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of macros\"] = macroData;", - " var i = 0;", - " var macro_name = \"$_SERVICE\" + postman.getEnvironmentVariable(\"hgservice_macro_name\") + \"$\";", - " while (i < macroData.length) {", - " if (macro_name == macroData[i]['macro name'])", - " {", - " tests[\"Body contains added macro_name\"] = macro_name == macroData[i]['macro name'];", - " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"hgservice_macro_value\") == macroData[i]['macro value'];", - " break;", - " }", - " i++;", - " }", - " if (i == macroData.length)", - " tests[\"hgservice_macro_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmacro", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hgservice_macro_name}};{{hgservice_macro_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of conctacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", - " {", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_alias was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setseverity", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Unsetseverity", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontactgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name)", - " {", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "43-Servicegroups", - "description": "Tests all commands to manage service groups.", - "item": [ - { - "name": "Add service group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"sg\",\n \"values\": \"sg_test;alias_test\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"sg_test;name;{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};activate;{{sg_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};alias;{{sg_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};comment;{{sg_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List service group", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var sgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of service groups\"] = sgData;", - " var i = 0;", - " while (i < sgData.length) {", - " if (postman.getEnvironmentVariable(\"sg_name\") == sgData[i].name)", - " {", - " tests[\"Body contains added service group\"] = postman.getEnvironmentVariable(\"sg_name\") == sgData[i].name;", - " tests[\"Body contains added service alias\"] = postman.getEnvironmentVariable(\"sg_alias\") == sgData[i].alias;", - " break;", - " }", - " i++;", - " }", - " if (i == sgData.length)", - " tests[\"sg_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"sg\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getservice", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serviceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of services\"] = serviceData;", - " var i = 0;", - " while (i < serviceData.length) {", - " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'])", - " {", - " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", - " tests[\"Body contains added service\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"service_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhostgroupservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhostgroupservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethostgroupservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gethostgroupservice", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hgserviceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of host group services\"] = hgserviceData;", - " var i = 0;", - " while (i < hgserviceData.length) {", - " if (postman.getEnvironmentVariable(\"hgservice_description\") == hgserviceData[i]['service description'])", - " {", - " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgserviceData[i]['hostgroup name'];", - " tests[\"Body contains added host hgservice_description\"] = postman.getEnvironmentVariable(\"hgservice_description\") == hgserviceData[i]['service description'];", - " break;", - " }", - " i++;", - " }", - " if (i == hgserviceData.length)", - " tests[\"hg_service_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"gethostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "44-Services_Categories", - "description": "Tests all commands to manage service categories.", - "item": [ - { - "name": "Setparam description", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};description;{{sc_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List service category", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var scData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of service categories\"] = scData;", - " var i = 0;", - " while (i < scData.length) {", - " if (postman.getEnvironmentVariable(\"sc_name\") == scData[i].name)", - " {", - " tests[\"Body contains added service category\"] = postman.getEnvironmentVariable(\"sc_name\") == scData[i].name;", - " tests[\"Body contains added description\"] = postman.getEnvironmentVariable(\"sc_description\") == scData[i].description;", - " break;", - " }", - " i++;", - " }", - " if (i == scData.length)", - " tests[\"sc_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"sc\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getservice", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serviceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of services\"] = serviceData;", - " var i = 0;", - " while (i < serviceData.length) {", - " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'])", - " {", - " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", - " tests[\"Body contains added service_description\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"service_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservicetemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getservicetemplate", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var stplData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of stpl_description\"] = stplData;", - " var i = 0;", - " while (i < stplData.length) {", - " if (postman.getEnvironmentVariable(\"stpl_description\") == hgserviceData[i]['service template description']){", - " tests[\"Body contains added stpl_description\"] = postman.getEnvironmentVariable(\"stpl_description\") == stplData[i]['service template description'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"stpl_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delservicetemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setservicetemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "50-Traps_Vendors", - "description": "Tests all commands to manage vendors.", - "item": [ - { - "name": "Add vendor", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;test_alias\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;name;{{vendor_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};alias;{{vendor_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam description", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};description;{{vendor_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List vendors", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var vendorData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of vendors\"] = vendorData;", - " var i = 0;", - " while (i < vendorData.length) {", - " if (postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name) {", - " tests[\"Body contains added vendor\"] = postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name;", - " tests[\"Body contains added vendor_alias\"] = postman.getEnvironmentVariable(\"vendor_alias\") == vendorData[i].alias;", - " break;", - " }", - " i++;", - " }", - " if (i == vendorData.length)", - " tests[\"vendor_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"show\",\n \"object\":\"vendor\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Generatetraps", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"generatetraps\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};{{mib_path}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "51-Traps_SNMP", - "description": "Tests all commands to manage traps.", - "item": [ - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};comments;{{trap_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam output", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};output;{{trap_output}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam oid", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};oid;{{trap_oid}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam status", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};status;{{trap_status}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam vendor", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};vendor;{{trap_vendor}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam matching_mode", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};matching_mode;{{trap_matching_mode}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam reschedule_svc_enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};reschedule_svc_enable;{{trap_reschedule_svc_enable}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam execution_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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam exec_command_enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command_enable;{{trap_exec_command_enable}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam submit_result_enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};submit_result_enable;{{trap_submit_result_enable}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List traps", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var trapData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of matchings\"] = trapData;", - " var i = 0;", - " while (i < trapData.length) {", - " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name) {", - " tests[\"Body contains added trap\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", - " tests[\"Body contains added trap oid\"] = postman.getEnvironmentVariable(\"trap_oid\") == trapData[i].oid;", - " break;", - " }", - " i++;", - " }", - " if (i == trapData.length)", - " tests[\"trap_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"show\",\n \"object\":\"trap\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addmatching", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};test_string;test_reg_exp;ok\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get matching id", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var matchingData = jsonData.result;", - "", - "try {", - " var i = 0;", - " while (i < matchingData.length) {", - " if (\"test_string\" == matchingData[i].string) {", - " postman.setEnvironmentVariable(\"trap_matching_token\",matchingData[i].id);", - " break;", - " }", - " i++;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Updatematching name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};string;{{trap_string}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Updatematching order", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};order;{{trap_matching_order}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Updatematching status", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};status;{{trap_status_string}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Updatematching regexp", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};regexp;{{trap_reg_exp}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmatching", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var matchingData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of matchings\"] = matchingData;", - " var i = 0;", - " while (i < matchingData.length) {", - " if (postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string) {", - " tests[\"Body contains added string\"] = postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string;", - " tests[\"Body contains added regular expression\"] = postman.getEnvironmentVariable(\"trap_reg_exp\") == matchingData[i].regexp;", - " tests[\"Body contains added matching status\"] = postman.getEnvironmentVariable(\"trap_status_string\") == matchingData[i].status;", - " tests[\"Body contains added matching order\"] = postman.getEnvironmentVariable(\"trap_matching_order\") == matchingData[i].order;", - " break;", - " }", - " i++;", - " }", - " if (i == matchingData.length)", - " tests[\"trap_string was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmatching", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "60-Downtimes", - "description": "Tests all commands to manage downtimes.", - "item": [ - { - "name": "Add downtime", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;descritpion_test\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;name;{{downtime_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam description", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};description;{{downtime_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List downtimes", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var downtimeData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of downtimes\"] = downtimeData;", - " var i = 0;", - " while (i < downtimeData.length) {", - " if (postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name){", - " tests[\"Body contains added downtime_name\"] = postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name;", - " tests[\"Body contains added downtime_description\"] = postman.getEnvironmentVariable(\"downtime_description\") == downtimeData[i].description;", - " break;", - " }", - " i++;", - " }", - " if (i == engineData.length)", - " tests[\"enine_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"DOWNTIME\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addweeklyperiod", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addweeklyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{weekly_start_time}};{{weekly_end_time}};{{weekly_fixed}};{{weekly_duration}};{{weekly_day_of_week}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addmonthlyperiod", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addmonthlyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{monthly_start_time}};{{monthly_end_time}};{{monthly_fixed}};{{monthly_duration}};{{monthly_day_of_month}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addspecificperiod", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addspecificperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{specific_start}};{{specific_end}};{{specific_fixed}};{{specific_duration}};{{specific_day_of_week}};{{specific_month_cycle}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List periods", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var downtimeData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of downtimes\"] = downtimeData;", - " var test_start_w = postman.getEnvironmentVariable(\"weekly_start_time\") + ':00';", - " var test_start_m = postman.getEnvironmentVariable(\"monthly_start_time\") + ':00';", - " var test_start_s = postman.getEnvironmentVariable(\"specific_start\") + ':00';", - " for (var i = 0; i < downtimeData.length; i++) {", - " if (test_start_w == downtimeData[i]['start time'])", - " {", - " tests[\"Body contains added weekly_start_time\"] = test_start_w == downtimeData[i]['start time'];", - " var test_end = postman.getEnvironmentVariable(\"weekly_end_time\") + ':00';", - " tests[\"Body contains added weekly_end_time\"] = test_end == downtimeData[i]['end time'];", - " tests[\"Body contains added weekly_fixed\"] = postman.getEnvironmentVariable(\"weekly_fixed\") == downtimeData[i].fixed;", - " if (downtimeData[i].fixed == \"0\")", - " tests[\"Body contains added weekly_duration\"] = postman.getEnvironmentVariable(\"weekly_duration\") == downtimeData[i].duration;", - " tests[\"Body contains added weekly_day_of_week\"] = postman.getEnvironmentVariable(\"weekly_number_days_of_week\") == downtimeData[i]['day of week'];", - " }", - " if (test_start_m == downtimeData[i]['start time'])", - " {", - " tests[\"Body contains added monthly_start_time\"] = test_start_m == downtimeData[1]['start time'];", - " var test_end = postman.getEnvironmentVariable(\"monthly_end_time\") + ':00';", - " tests[\"Body contains added monthly_end_time\"] = test_end == downtimeData[i]['end time'];", - " tests[\"Body contains added monthly_fixed\"] = postman.getEnvironmentVariable(\"monthly_fixed\") == downtimeData[i].fixed;", - " if (downtimeData[i].fixed == \"0\")", - " tests[\"Body contains added monthly_duration\"] = postman.getEnvironmentVariable(\"monthly_duration\") == downtimeData[i].duration;", - " tests[\"Body contains added monthly_day_of_month\"] = postman.getEnvironmentVariable(\"monthly_day_of_month\") == downtimeData[i]['day of month'];", - " }", - " if (test_start_s == downtimeData[i]['start time'])", - " {", - " tests[\"Body contains added specific_start_time\"] = test_start_s == downtimeData[i]['start time'];", - " var test_end = postman.getEnvironmentVariable(\"specific_end\") + ':00';", - " tests[\"Body contains added specific_end_time\"] = test_end == downtimeData[i]['end time'];", - " tests[\"Body contains added specific_fixed\"] = postman.getEnvironmentVariable(\"specific_fixed\") == downtimeData[i].fixed;", - " if (downtimeData[i].fixed == \"0\")", - " tests[\"Body contains added specific_duration\"] = postman.getEnvironmentVariable(\"specific_duration\") == downtimeData[i].duration;", - " tests[\"Body contains added specific_day_of_week\"] = postman.getEnvironmentVariable(\"specific_number_day_of_week\") == downtimeData[i]['day of week'];", - " }", - " }", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listperiods\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhost", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhost", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethost", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservicegroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delservicegroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setservicegroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Show Service Realtime", - "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\";", - "", - "var jsonData = JSON.parse(responseBody);", - "var result = jsonData.result;", - "", - "var schema = {", - " \"type\": \"array\",", - " \"items\": {", - " \"type\": \"object\",", - " \"properties\": {", - " \"host_name\": {", - " \"type\": \"string\"", - " },", - " \"service_name\": {", - " \"type\": \"string\"", - " },", - " \"author\": {", - " \"type\": \"string\"", - " },", - " \"actual_start_time\": {", - " \"type\": \"string\"", - " },", - " \"end_time\": {", - " \"type\": \"string\"", - " },", - " \"comment_data\": {", - " \"type\": \"string\"", - " },", - " \"duration\": {", - " \"type\": \"string\"", - " },", - " \"fixed\": {", - " \"type\": \"string\"", - " },", - " \"url\": {", - " \"type\": \"string\"", - " }", - " },", - " \"additionalProperties\": false,", - " \"required\": [\"host_name\", \"service_name\", \"author\", \"actual_start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", - " }", - "}", - "", - "tests[\"Validate schema JSON\"] = tv4.validate(result, schema);" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;esx-alger-01|ping\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Show Host Realtime", - "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\";", - "", - "var jsonData = JSON.parse(responseBody);", - "var result = jsonData.result;", - "", - "var schema = {", - " \"type\": \"array\",", - " \"items\": {", - " \"type\": \"object\",", - " \"properties\": {", - " \"host_name\": {", - " \"type\": \"string\"", - " },", - " \"author\": {", - " \"type\": \"string\"", - " },", - " \"actual_start_time\": {", - " \"type\": \"string\"", - " },", - " \"end_time\": {", - " \"type\": \"string\"", - " },", - " \"comment_data\": {", - " \"type\": \"string\"", - " },", - " \"duration\": {", - " \"type\": \"string\"", - " },", - " \"fixed\": {", - " \"type\": \"string\"", - " },", - " \"url\": {", - " \"type\": \"string\"", - " }", - " },", - " \"additionalProperties\": false,", - " \"required\": [\"host_name\", \"author\", \"actual_start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", - " }", - "}", - "", - "tests[\"Validate schema JSON\"] = tv4.validate(result, schema);" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;esx-alger-01\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhost Realtime", - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "postman.setGlobalVariable(\"fixed\", \"1\");", - "", - "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + ('0' + date.getHours()).slice(-2) + \":\" + ", - " ('0' + date.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", - "", - "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + ('0' + dateEnd.getHours()).slice(-2) + \":\" + ", - "('0' + dateEnd.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"end_time\", datetime_end);", - "" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;esx-alger-01;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire\"\n}\n" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservice Realtime", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - }, - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "postman.setGlobalVariable(\"fixed\", \"1\");", - "", - "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + ('0' + date.getHours()).slice(-2) + \":\" + ", - " ('0' + date.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", - "", - "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + ('0' + dateEnd.getHours()).slice(-2) + \":\" + ", - "('0' + dateEnd.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"end_time\", datetime_end);", - "" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;esx-alger-01|ping;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhostgroup Realtime", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - }, - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "postman.setGlobalVariable(\"fixed\", \"1\");", - "", - "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", - " ('0' + date.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", - "", - "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", - "('0' + dateEnd.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"end_time\", datetime_end);" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HG;Databases1;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservicegroup Realtime", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - }, - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "postman.setGlobalVariable(\"fixed\", \"1\");", - "", - "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", - " ('0' + date.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", - "", - "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", - "('0' + dateEnd.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"end_time\", datetime_end);" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SG;Traffic-Europe;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addinstance Realtime", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - }, - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "postman.setGlobalVariable(\"fixed\", \"1\");", - "", - "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", - " ('0' + date.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", - "", - "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", - "('0' + dateEnd.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"end_time\", datetime_end);" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;Central;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "61-Dependencies", - "description": "Tests all commands to manage dependencies.", - "item": [ - { - "name": "Add dependency", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"dep\",\n \"values\": \"dep_test;test_description;{{dep_type}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"dep_test;name;{{dep_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam description", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};description;{{dep_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};comment;{{dep_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam inherits_parent", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};inherits_parent;{{dep_inherits_parent}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam exec_fail_criteria", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};execution_failure_criteria;{{dep_exec_fail_crit}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam notif_fail_criteria", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};notification_failure_criteria;{{dep_notif_fail_crit}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List dependencies", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var depData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of dependencies\"] = depData;", - " var i = 0;", - " while (i < depData.length) {", - " if (postman.getEnvironmentVariable(\"dep_name\") == depData[i].name)", - " {", - " tests[\"Body contains added dep_name\"] = postman.getEnvironmentVariable(\"dep_name\") == depData[i].name;", - " tests[\"Body contains added dep_description\"] = postman.getEnvironmentVariable(\"dep_description\") == depData[i].description;", - " tests[\"Body contains added dep_inherits_parents\"] = postman.getEnvironmentVariable(\"dep_inherits_parent\") == depData[i].inherits_parent;", - " tests[\"Body contains added dep_execution_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_exec_fail_crit\") == depData[i].execution_failure_criteria;", - " tests[\"Body contains added dep_notification_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_notif_fail_crit\") == depData[i].notification_failure_criteria;", - " break;", - " }", - " i++;", - " }", - " if (i == depData.length)", - " tests[\"dep_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"dep\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Create host3", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name3}};{{host_name3}};0.0.0.0;;central;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addchild", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delparent", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Listdep", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var depData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of dependencies\"] = depData;", - " var i = 0;", - " var nb_find = 0", - " while (i < depData.length) {", - " if (postman.getEnvironmentVariable(\"host_name\") == depData[i].parents)", - " {", - " tests[\"Body contains added a parent\"] = postman.getEnvironmentVariable(\"host_name\") == depData[i].parents;", - " nb_find += 1;", - " }", - " if (postman.getEnvironmentVariable(\"host_name3\") == depData[i].children)", - " {", - " tests[\"Body contains added a child\"] = postman.getEnvironmentVariable(\"host_name3\") == depData[i].children;", - " nb_find += 1;", - " }", - " if (nb_find == 2)", - " break;", - " i++;", - " }", - " if (i == depData.length)", - " tests[\"the child and the parent were found\"] = i < depData.length;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"listdep\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delchild", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "70-ACL_Groups", - "description": "Tests all commands to manage ACL groups.", - "item": [ - { - "name": "Add ACL group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;aclg_alias\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;name;{{aclg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};alias;{{aclg_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};activate;{{aclg_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List ACL groups", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL groups\"] = aclgData;", - " var i = 0;", - " while (i < aclgData.length) {", - " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", - " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", - " tests[\"Body contains added aclg_alias\"] = postman.getEnvironmentVariable(\"aclg_alias\") == aclgData[i].alias;", - " tests[\"Body contains added aclg_activate\"] = postman.getEnvironmentVariable(\"aclg_activate\") == aclgData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == aclgData.length)", - " tests[\"aclg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"aclgroup\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add resource ACL", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;test_alias\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;name;{{racl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addresource", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delresource", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setresource", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getresource", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var raclData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL resources\"] = raclData;", - " var i = 0;", - " while (i < raclData.length) {", - " if (postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name) {", - " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == raclData.length)", - " tests[\"racl_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontact", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontact", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", - " tests[\"Body contains added contact\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"aclg_contact_alias was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontactgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add ACL Menu", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;test_alias\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;name;{{aclmenu_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addmenu", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmenu", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setmenu", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmenu", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclmenuData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL menus\"] = aclmenuData;", - " var i = 0;", - " while (i < aclmenuData.length) {", - " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", - " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == aclmenuData.length)", - " tests[\"menu_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Add ACL action", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;acla_description\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;name;{{acla_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addaction", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delaction", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setaction", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getaction", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclaData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL actions\"] = aclaData;", - " var i = 0;", - " while (i < aclaData.length) {", - " if (postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name) {", - " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == aclaData.length)", - " tests[\"acla_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "71-ACL_Menus", - "description": "Tests all commands to manage ACL menu.", - "item": [ - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};alias;{{aclmenu_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};activate;{{aclmenu_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};comment;{{aclmenu_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List ACL menu", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclmenuData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL Menu\"] = aclmenuData;", - " var i = 0;", - " while (i < aclmenuData.length) {", - " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", - " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", - " tests[\"Body contains added aclmenu_alias\"] = postman.getEnvironmentVariable(\"aclmenu_alias\") == aclmenuData[i].alias;", - " tests[\"Body contains added aclmenu_comment\"] = postman.getEnvironmentVariable(\"aclmenu_comment\") == aclmenuData[i].comment;", - " tests[\"Body contains added aclmenu_activate\"] = postman.getEnvironmentVariable(\"aclmenu_activate\") == aclmenuData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == aclmenuData.length)", - " tests[\"aclmenu_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"aclmenu\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get ACL Groups", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL Menu\"] = aclgData;", - " var i = 0;", - " while (i < aclgData.length) {", - " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", - " tests[\"Body contains ACL menu\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i > aclgData.length)", - " tests[\"aclg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw Home", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke Home", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw Custom Views", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke Custom Views", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw Edit View", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke Edit View", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw Share View", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke Share View", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw Widget Parameters", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke Widget Parameters", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw Add Widget", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke Add Widget", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw rotation", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke rotation", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw delete view", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke delete view", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw add view", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke add view", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw set default", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke set default", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw poller statistics", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke poller statistics", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw broker statistics", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke broker statistics", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw graphs (poller)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke graphs (poller)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw monitoring", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke monitoring", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw status details", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke status details", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services (monitoring)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services (monitoring)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw hosts (monitoring)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke hosts (monitoring)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services grid", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services grid", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services by hostgroup", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services by hostgroup", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services by servicegroup", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services by servicegroup", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw hostgroups summary", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke hostgroups summary", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw performances", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke performances", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw graphs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke graphs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw chart split", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke chart split", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw chart periods", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke chart periods", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw templates (perf)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke templates (perf)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw curves", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke curves", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw metrics", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke metrics", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw event logs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke event logs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw event logs (advanced)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke event logs (advanced)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw system logs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke system logs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw downtimes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke downtimes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw downtimes (main menu)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke downtimes (main menu)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw recurrent downtimes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro recurrent downtimes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke recurrent downtimes", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw comments", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke comments", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw reporting", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke reporting", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw dashboard", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke dashboard", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw hosts (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke hosts (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw host groups (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host groups (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw service groups (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service groups (dashboard)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant hostsrw (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke hosts (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant hostsrw (config/host)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant hostsro (config/host)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke hosts (config/host)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw host groups (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro host groups (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host groups (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw templates (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro templates (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke templates (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw categories (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro categories (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke categories (config/hosts)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services by host (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro services by host (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services by host (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services by host group (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro services by host group (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services by host group (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw service groups (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro service groups (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service groups (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw templates (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro templates (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke templates (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw categories (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro categories (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke categories (config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw meta services(config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke meta services(config/services)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw users", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke users", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw Contacts / Users", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro Contacts / Users", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke Contacts / Users", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw contact templates", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro contact templates", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke contact templates", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw contact groups", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro contact groups", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke contact groups", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw time periods", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro time periods", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke time periods", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw commands", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke commands", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw discovery", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro discovery", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke discovery", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw miscellaneous", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro miscellaneous", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke miscellaneous", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw connectors", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro connectors", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke connectors", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw escalations", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro escalations", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke escalations", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw hosts (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro hosts (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke hosts (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw host groups (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro host groups (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host groups (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services(dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro services(dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services(dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw service groups(dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro service groups(dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service groups(dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw meta services (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro meta services (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke meta services (dependencies)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw SNMP traps (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke SNMP traps (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw SNMP traps (SNMP)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;snmp traps\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke SNMP traps (SNMP)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;snmp traps\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw manufacturer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;manufacturer\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke manufacturer", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;manufacturer\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw group (SNMP)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;group\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke group (SNMP)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;group\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw mibs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;mibs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke mibs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;mibs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw generate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;generate\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke generate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;generate\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw knowledge base", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke knowledge base", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw hosts (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke hosts (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;hosts\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw services (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke services (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw host templates (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;host templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host templates (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;host templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw service templates (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;service templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service templates (knowledge)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;service templates\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw pollers (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke pollers (config)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw export configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;export configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke export configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;export configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw pollers (pollers)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro pollers (pollers)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke pollers (pollers)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw engine configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantro engine configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke engine configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw broker configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke broker configuration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw wizard", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizard\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke wizard", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizard\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw wizardajax", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizardajax\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke wizardajax", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizardajax\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw resources", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;resources\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke resources", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;resources\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw administration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke administration", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw parameters", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke parameters", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw centreon UI", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centreon UI\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke centreon UI", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centreon UI\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw monitoring (parameters)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;monitoring\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke monitoring (parameters)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;monitoring\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw centcore", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centcore\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke centcore", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centcore\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw my account", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;my account\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke my account", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;my account\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw LDAP", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;LDAP\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke LDAP", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;LDAP\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw RRDtool", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;RRDtool\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke RRDtool", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;RRDtool\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw debug", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;debug\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke debug", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;debug\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw knowledge base (parameters)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;knowledge base\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke knowledge base (parameters)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;knowledge base\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw CSS", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;CSS\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke CSS", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;CSS\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw backup", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;backup\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke backup", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;backup\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;options\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke options", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;options\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw data", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;data\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke data", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;data\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw images", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;images\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke images", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;images\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw extensions", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke extensions", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw modules", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;modules\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke modules", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;modules\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw widgets", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;widgets\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke widgets", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;widgets\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw ACL", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke ACL", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw access groups", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;access groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke access groups", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;access groups\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw menus access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;menus access\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke menus access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;menus access\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw resources access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;resources access\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke resources access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;resources access\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw actions access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;actions access\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke actions access", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;actions access\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw reload ACL", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;reload ACL\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke reload ACL", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;reload ACL\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw logs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke logs", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw visualisation", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs;visualisation\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke visualisation", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs;visualisation\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw sessions", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;sessions\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke sessions", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;sessions\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw server status", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke server status", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw databases", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status;databases\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke databases", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status;databases\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw about (admin)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke about (admin)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw about (about)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about;about\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke about (about)", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about;about\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "72-ACL_Resources", - "description": "Tests all commands to manage Resource ACL.", - "item": [ - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};alias;{{racl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};activate;{{racl_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List resource ACL", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var raclData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL resource\"] = raclData;", - " var i = 0;", - " while (i < raclData.length) {", - " if (postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name) {", - " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name;", - " tests[\"Body contains added racl_alias\"] = postman.getEnvironmentVariable(\"racl_alias\") == raclData[i].alias;", - " tests[\"Body contains added racl_activate\"] = postman.getEnvironmentVariable(\"racl_activate\") == raclData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == raclData.length)", - " tests[\"racl_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"aclresource\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getaclgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL groups\"] = aclgData;", - " var i = 0;", - " while (i < aclgData.length) {", - " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", - " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == aclgData.length)", - " tests[\"aclg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant_host", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant_host\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke_host", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke_host\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant_hostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant_hostgroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke_hostgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke_hostgroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant_servicegroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant_servicegroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke_servicegroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke_servicegroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "addhostexclusion", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhostexclusion\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "delhostexclusion", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhostexclusion\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "addfilter_instance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addfilter_instance\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "delfilter_instance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delfilter_instance\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "addfilter_hostcategory", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addfilter_hostcategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "delfilter_hostcategory", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delfilter_hostcategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "addfilter_servicecategory", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addfilter_servicecategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "delfilter_servicecategory", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delfilter_servicecategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "74-ACL_Actions", - "description": "Tests all commands to manage ACL action.", - "item": [ - { - "name": "Setparam description", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};description;{{acla_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};activate;{{acla_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List ACL actions", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclaData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL actions\"] = aclaData;", - " var i = 0;", - " while (i < aclaData.length) {", - " if (postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name) {", - " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name;", - " tests[\"Body contains added acla_description\"] = postman.getEnvironmentVariable(\"acla_description\") == aclaData[i].description;", - " tests[\"Body contains added acla_activate\"] = postman.getEnvironmentVariable(\"acla_activate\") == aclaData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == aclaData.length)", - " tests[\"acla_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"aclaction\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getaclgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclaData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL actions\"] = aclaData;", - " var i = 0;", - " while (i < aclaData.length) {", - " if (postman.getEnvironmentVariable(\"aclg_name\") == aclaData[i].name) {", - " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclaData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == aclaData.length)", - " tests[\"aclg_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_event_handler", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_event_handler\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_event_handler", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_event_handler\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_flap_detection", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_flap_detection\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_flap_detection", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_flap_detection\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_host_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_host_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_host_obsess", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_obsess\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_host_obsess", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_obsess\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_host_passive_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_passive_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_host_passive_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_passive_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_perf_data", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_perf_data\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_perf_data", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_perf_data\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_restart", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_restart\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_restart", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_restart\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_service_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_service_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_service_obsess", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_obsess\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_service_obsess", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_obsess\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_service_passive_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_passive_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_service_passive_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_passive_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant global_shutdown", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_shutdown\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke global_shutdown", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_shutdown\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_acknowledgement", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_acknowledgement\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_acknowledgement", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_acknowledgement\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_checks_for_services", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks_for_services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_checks_for_services", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks_for_services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_comment\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_comment\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_event_handler", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_event_handler\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_event_handler", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_event_handler\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_flap_detection", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_flap_detection\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_flap_detection", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_flap_detection\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_notifications_for_services", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications_for_services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_notigications_for_services", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications_for_services\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_schedule_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_schedule_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_schedule_downtime", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_forced_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_schedule_downtime", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_downtime\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_schedule_forced_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_forced_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_schedule_forced_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_forced_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant host_submit_result", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_submit_result\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke host_submit_result", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_submit_result\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant poller_listing", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_listing\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke poller_listing", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_listing\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant poller_stats", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_stats\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke poller_stats", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_stats\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_acknowledgement", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_acknowledgement\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_acknowledgement", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_acknowledgement\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_comment\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_comment\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_event_handler", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_event_handler\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_event_handler", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_event_handler\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_flap_detection", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_flap_detection\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_flap_detection", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_flap_detection\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_notifications", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_notifications\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_passive_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_passive_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_passive_checks", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_passive_checks\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_schedule_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_schedule_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_schedule_downtime", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_downtime\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_schedule_downtime", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_downtime\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_schedule_forced_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_forced_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_schedule_forced_check", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_forced_check\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant service_submit_result", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_submit_result\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke service_submit_result", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_submit_result\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant top_counter", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};top_counter\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke top_counter", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};top_counter\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "75-ACL_Reload", - "description": "Tests all commands to manage ACL.", - "item": [ - { - "name": "Reload", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"reload\",\n \"object\": \"acl\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Lastreload", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"lastreload\",\n \"object\": \"acl\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Lastreload input time", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"lastreload\",\n \"object\": \"acl\",\n \"values\": \"lastreload_time\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "80-Administration_General_Settings", - "description": "Tests all commands to manage settings.", - "item": [ - { - "name": "Setparam broker", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"broker;{{broker_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam broker_correlator_script", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"broker_correlator_script;{{broker_correlator_script}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam centstorage", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"centstorage;{{centstorage_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam debug_auth", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_auth;{{enable_debug_auth}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam debug_ldap_import", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_ldap_import;{{enable_ldap_debug}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam debug_nagios_import", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_nagios_import;{{enable_nagios_debug}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam debug_path", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_path;{{debug_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam debug_rrdtool", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_rrdtool;{{enable_debug_rrdtool}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam enable_autologin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_autologin;{{enable_autologin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam enable_gmt", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_gmt;{{enable_gmt}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam enable_logs_sync", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_logs_sync;{{enable_logs_sync}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam enable_perfdata_sync", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_perfdata_sync;{{enable_perfdata_sync}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam gmt", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"gmt;{{gmt_value}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam interval_length", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"interval_length;{{interval_length}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam mailer_path_bin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"mailer_path_bin;{{mailer_path_bin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam nagios_path_img", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"nagios_path_img;{{nagios_path_img}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam perl_library_path", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"perl_library_path;{{perl_library_path}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam rrdtool_path_bin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"rrdtool_path_bin;{{rrdtool_path_bin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam snmpttconvertmib_path_bin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"snmpttconvertmib_path_bin;{{snmpttconvertmib_path_bin}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam snmptt_unknowntrap_log_file", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"snmptt_unknowntrap_log_file;{{snmptt_unknowntrap_log_file}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List settings", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var exceptionData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of exceptions\"] = exceptionData;", - " for (var i = 0; i < exceptionData.length; i++) {", - " switch (exceptionDate[i].parameter)", - " {", - " case \"broker\":", - " tests[\"Body contains the correct setting broker\"] = postman.getEnvironmentVariable(\"broker_value\") == exceptionData[i].value;", - " break;", - " case \"broker_correlator_script\":", - " tests[\"Body contains the correct setting broker_correlator_script\"] = postman.getEnvironmentVariable(\"broker_correlator_script\") == exceptionData[i].value;", - " break;", - " case \"debug_auth\":", - " tests[\"Body contains the correct setting debug_auth\"] = postman.getEnvironmentVariable(\"enable_debug_auth\") == exceptionData[i].value;", - " break;", - " case \"debug_ldap_import\":", - " tests[\"Body contains the correct setting debug_ldap_import\"] = postman.getEnvironmentVariable(\"enable_ldap_debug\") == exceptionData[i].value;", - " break;", - " case \"debug_nagios_import\":", - " tests[\"Body contains the correct setting debug_nagios_ldap\"] = postman.getEnvironmentVariable(\"enable_nagios_debug\") == exceptionData[i].value;", - " break;", - " case \"debug_path\":", - " tests[\"Body contains the correct setting debug_path\"] = postman.getEnvironmentVariable(\"debug_path\") == exceptionData[i].value;", - " break;", - " case \"debug_rrdtool\":", - " tests[\"Body contains the correct setting debug_rrdtool\"] = postman.getEnvironmentVariable(\"enable_debug_rrdtool\") == exceptionData[i].value;", - " break;", - " case \"enable_autologin\":", - " tests[\"Body contains the correct setting enable_authologin\"] = postman.getEnvironmentVariable(\"enable_autologin\") == exceptionData[i].value;", - " break;", - " case \"enable_logs_sync\":", - " tests[\"Body contains the correct setting enable_logs_sync\"] = postman.getEnvironmentVariable(\"enable_logs_sync\") == exceptionData[i].value;", - " break;", - " case \"enable_perfdata_sync\":", - " tests[\"Body contains the correct setting enable_logs_sync\"] = postman.getEnvironmentVariable(\"enable_logs_sync\") == exceptionData[i].value;", - " break;", - " case \"enable_perfdata_sync\":", - " tests[\"Body contains the correct setting enable_perfdata_sync\"] = postman.getEnvironmentVariable(\"enable_perfdata_sync\") == exceptionData[i].value;", - " break;", - " case \"gmt\":", - " tests[\"Body contains the correct setting gmt\"] = postman.getEnvironmentVariable(\"gmt_value\") == exceptionData[i].value;", - " break;", - " case \"interval_length\":", - " tests[\"Body contains the correct setting interval_length\"] = postman.getEnvironmentVariable(\"interval_length\") == exceptionData[i].value;", - " break;", - " case \"mailer_path_bin\":", - " tests[\"Body contains the correct setting mailer_path_bin\"] = postman.getEnvironmentVariable(\"mailer_path_bin\") == exceptionData[i].value;", - " break;", - " case \"nagios_path_img\":", - " tests[\"Body contains the correct setting nagios_path_img\"] = postman.getEnvironmentVariable(\"nagios_path_img\") == exceptionData[i].value;", - " break;", - " case \"perl_library_path\":", - " tests[\"Body contains the correct setting perl_library_path\"] = postman.getEnvironmentVariable(\"perl_library_path\") == exceptionData[i].value;", - " break;", - " case \"rrdtool_path_bin\":", - " tests[\"Body contains the correct setting rrdtool_path_bin\"] = postman.getEnvironmentVariable(\"rrdtool_path_bin\") == exceptionData[i].value;", - " break;", - " case \"snmpttconvertmib_path_bin\":", - " tests[\"Body contains the correct setting snmpttconvertmib_path_bin\"] = postman.getEnvironmentVariable(\"snmpttconvertmib_path_bin\") == exceptionData[i].value;", - " break;", - " case \"snmptt_unknowntrap_log_file\":", - " tests[\"Body contains the correct setting snmptt_unknowntrap_log_file\"] = postman.getEnvironmentVariable(\"snmptt_unknowntrap_log_file\") == exceptionData[i].value;", - " break;", - " }", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"show\",\n \"object\":\"settings\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "81-Administration_LDAP_Settings", - "description": "Tests all commands to manage LDAP.", - "item": [ - { - "name": "Add LDAP", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"ldap\",\n \"values\": \"test_ldap;test_description\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"test_ldap;name;{{ldap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam description", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};description;{{ldap_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};enable;{{ldap_enable}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};alias;{{ldap_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam bind_dn", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};bind_dn;{{ldap_bind_dn}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam bind_pass", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};bind_pass;{{ldap_bind_pass}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam group_base_search", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_base_search;{{ldap_group_base_search}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam group_filter", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_filter;{{ldap_group_filter}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam group_member", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_member;{{ldap_group_member}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam group_name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_name;{{ldap_group_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_auto_import", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_auto_import;{{ldap_auto_import}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_contact_tmpl", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_contact_tmpl;{{ctpl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_dns_use_domain", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_dns_use_domain;{{ldap_dns_use_domain}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_search_limit", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_search_limit;{{ldap_search_limit}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_search_timeout", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_search_timeout;{{ldap_search_timeout}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_srv_dns", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_srv_dns;{{ldap_srv_dns}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_store_password", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_store_password;{{ldap_store_pwd}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam ldap_template", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_template;{{ldap_tpl}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam protocol_version", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};protocol_version;{{ldap_protocol_version}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_base_search", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_base_search;{{ldap_user_base_search}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_email", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_email;{{ldap_user_email}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_filter", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_filter;{{ldap_user_filter}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_firstname", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_firstname;{{ldap_user_firstname}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_lastname", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_lastname;{{ldap_user_lastname}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_name;{{ldap_user_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_pager", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_pager;{{ldap_user_pager}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam user_group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_group;{{ldap_user_group}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List LDAP", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var ldapData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ldap configurations\"] = ldapData;", - " var i = 0;", - " while (i < ldapData.length) {", - " if (postman.getEnvironmentVariable(\"ldap_name\") == ldapData[i].name) {", - " tests[\"Body contains added ldap_name\"] = postman.getEnvironmentVariable(\"ldap_name\") == ldapData[i].name;", - " tests[\"Body contains added ldap_description\"] = postman.getEnvironmentVariable(\"ldap_description\") == ldapData[i].description;", - " tests[\"Body contains added ldap_enable\"] = postman.getEnvironmentVariable(\"ldap_enable\") == ldapData[i].status;", - " break;", - " }", - " i++;", - " }", - " if (i == ldapData.length)", - " tests[\"ldap_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"ldap\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addserver", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};{{ldap_server_address}};{{ldap_server_port}};{{ldap_use_ssl}};{{ldap_use_tls}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get server id", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serverData = jsonData.result;", - "", - "try {", - " var i = 0;", - " while (i < serverData.length) {", - " if (postman.getEnvironmentVariable(\"ldap_server_address\") == serverData[i].address) {", - " postman.setEnvironmentVariable(\"ldap_server_id\",serverData[i].id);", - " break;", - " }", - " i++;", - " }", - " if (i == serverData.length)", - " tests[\"ldap_server_adress was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"showserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparamserver host_address", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};host_address;{{ldap_host_address}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparamserver host_port", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};host_port;{{ldap_host_port}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparamserver host_order", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};host_order;{{ldap_host_order}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparamserver use_ssl", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};use_ssl;{{ldap_use_ssl_changed}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparamserver use_tls", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};use_tls;{{ldap_use_tls_changed}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Showserver", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serverData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of servers\"] = serverData;", - " var i = 0;", - " while (i < serverData.length) {", - " if (postman.getEnvironmentVariable(\"ldap_host_address\") == serverData[i].address) {", - " tests[\"Body contains added server\"] = postman.getEnvironmentVariable(\"ldap_host_address\") == serverData[i].address;", - " tests[\"Body contains added server_port\"] = postman.getEnvironmentVariable(\"ldap_host_port\") == serverData[i].port;", - " tests[\"Body contains added server_use_ssl\"] = postman.getEnvironmentVariable(\"ldap_use_ssl_changed\") == serverData[i].ssl;", - " tests[\"Body contains added server_use_tls\"] = postman.getEnvironmentVariable(\"ldap_use_tls_changed\") == serverData[i].tls;", - " tests[\"Body contains added server_use_tls\"] = postman.getEnvironmentVariable(\"ldap_host_order\") == serverData[i].order;", - " break;", - " }", - " i++;", - " }", - " if (i == serverData.length)", - " tests[\"ldap_server_address was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"showserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delserver", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "90-Engine_CFG", - "description": "Tests all commands to manage ACL.", - "item": [ - { - "name": "Add engine_CFG", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_nagios_config}};{{instance_name}};{{engine_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_nagios_config}};nagios_name;{{engine_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam instance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};instance;{{instance_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam broker_module", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};broker_module;{{instance_broker_module}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam activate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};nagios_activate;{{instance_activate}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List engine_CFG", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var engineData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of downtimes\"] = engineData;", - " var i = 0;", - " while (i < engineData.length) {", - " if (postman.getEnvironmentVariable(\"engine_name\") == engineData[i]['nagios name']){", - " tests[\"Body contains added engine_name\"] = postman.getEnvironmentVariable(\"engine_name\") == engineData[i]['nagios name'];", - " tests[\"Body contains added instance_name2\"] = postman.getEnvironmentVariable(\"instance_name2\") == engineData[i].instance;", - " tests[\"Body contains added engine_comment\"] = postman.getEnvironmentVariable(\"engine_comment\") == engineData[i]['nagios comment'];", - " break;", - " }", - " i++;", - " }", - " if (i == engineData.length)", - " tests[\"engine_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"enginecfg\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addbrokermodule", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addbrokermodule\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};{{instance_broker_module2}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "99-Delete", - "description": "", - "item": [ - { - "name": "Del ACL action", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del ACL group", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del ACL Menu", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del resource ACL", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del 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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del contact group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del ctpl", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del ctpl2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del contact", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del contact2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del dependencies", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del downtime", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del engine_CFG", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del host category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del hgservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del host group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del host group2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del resource CFG", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del Instance", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del Instance2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del service", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del host3", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"host\",\n \"values\": \"{{host_name3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del htpl2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del htpl3", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name3}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del LDAP", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del service group", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del service template", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del service template2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description2}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del service category", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del host", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del htpl", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del tp", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del trap", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del vendor", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delinput ipv4", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delinput ipv6", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delinput file", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Dellogger file", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Dellogger standard", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Dellogger syslog", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Dellogger monitoring", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deloutput ipv4", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deloutput ipv6", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deloutput file", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deloutput rrd", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deloutput storage", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Deloutput sql", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del broker", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Del host2", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"del\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - } - ] + "variables": [], + "info": { + "name": "Centreon Web Rest API copy", + "_postman_id": "e687a42e-6678-d1f4-1fcf-14cd2867c15c", + "description": "", + "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" + }, + "item": [ + { + "name": "00-Configure_Poller", + "description": "", + "item": [ + { + "name": "Authenticate", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "postman.setEnvironmentVariable(\"token\",jsonData.authToken);" + ] + } + } + ], + "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" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/x-www-form-urlencoded" + } + ], + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "key": "username", + "type": "text", + "value": "{{api_user}}" + }, + { + "key": "password", + "type": "text", + "value": "{{api_password}}" + } + ] + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add Instance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"instance\",\n \"values\": \"test_instance;01.02.3.04;42;nagios\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"test_instance;name;{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam localhost", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};localhost;{{instance_localhost}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ns_ip_address", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};ns_ip_address;{{instance_address}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ns_activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};ns_activate;{{instance_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam init_script", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};init_script;{{instance_init_script}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam monitoring_engine", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};monitoring_engine;{{instance_monitoring_engine}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam nagios_bin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};nagios_bin;{{instance_nagios_bin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam nagiostats_bin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};nagiostats_bin;{{instance_nagiostats_bin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam nagios_perfdata", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};nagios_perfdata;{{instance_nagios_perfdata}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ssh_port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};ssh_port;{{instance_ssh_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam centreonbroker_cfg_path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};centreonbroker_cfg_path;{{instance_broker_cfg_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam centreonbroker_module_path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}};centreonbroker_module_path;{{instance_broker_module_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List instances", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var instanceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of instances\"] = instanceData;", + " var i = 0;", + " while (i < instanceData.length) {", + " if (postman.getEnvironmentVariable(\"instance_name\") == instanceData[i].name) {", + " tests[\"Body contains added instance\"] = postman.getEnvironmentVariable(\"instance_name\") == instanceData[i].name;", + " tests[\"Body contains added instance_localhost\"] = postman.getEnvironmentVariable(\"instance_localhost\") == instanceData[i].localhost;", + " tests[\"Body contains added instance_address\"] = postman.getEnvironmentVariable(\"instance_address\") == instanceData[i]['ip address'];", + " tests[\"Body contains added instance_activate\"] = postman.getEnvironmentVariable(\"instance_activate\") == instanceData[i].activate;", + " tests[\"Body contains added instance_init_script\"] = postman.getEnvironmentVariable(\"instance_init_script\") == instanceData[i]['init script'];", + " tests[\"Body contains added instance_nagios_bin\"] = postman.getEnvironmentVariable(\"instance_nagios_bin\") == instanceData[i].bin;", + " tests[\"Body contains added instance_nagiostats_bin\"] = postman.getEnvironmentVariable(\"instance_nagiostats_bin\") == instanceData[i]['stats bin'];", + " tests[\"Body contains added instance_ssh_port\"] = postman.getEnvironmentVariable(\"instance_ssh_port\") == instanceData[i]['ssh port'];", + " break;", + " }", + " i++;", + " }", + " if (i == instanceData.length)", + " tests[\"instance_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"instance\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create host2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}};{{host_name2}};0.0.0.0;;central;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create Instance-2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name2}};01.3.04.65;98;nagios\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinstance host", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinstance\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}};{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gethosts", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hostData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of hosts\"] = hostData;", + " var i = 0;", + " while (i < hostData.length) {", + " if (postman.getEnvironmentVariable(\"instance_host\") == hostData[i].name) {", + " break;", + " }", + " i++;", + " }", + " tests[\"Body contains added host\"] = postman.getEnvironmentVariable(\"instance_host\") == hostData[i].generic-active-host;", + " tests[\"Body contains added host_address\"] = postman.getEnvironmentVariable(\"host_address\") == hostData[i]['0.0.0.1'];", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"gethosts\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "01-Configure_Centreon_Engine", + "description": "", + "item": [ + { + "name": "Add resource CFG", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"resourcecfg\",\n \"values\": \"test_resourcecfg;test_value;{{instance_name}};test_comment\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get ressource id", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var resourceData = jsonData.result;", + "", + "try {", + " var i = 0;", + " while (i < resourceData.length) {", + " if (\"$test_resourcecfg$\" == resourceData[i].name) {", + " postman.setEnvironmentVariable(\"resourcecfg_id\",resourceData[i].id);", + " break;", + " }", + " i++;", + " }", + " if (i == resourceData.length)", + " tests[\"the resourcecfg was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"resourcecfg\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};name;{{rcfg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam value", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};value;{{rcfg_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};activate;{{rcfg_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};comment;{{rcfg_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam instance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}};instance;{{rcfg_instance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List resource CFG", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var rcfgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of resources CFG\"] = rcfgData;", + " var i = 0;", + " var rcfgname = \"$\"+ postman.getEnvironmentVariable(\"rcfg_name\") + \"$\";", + " while (i < rcfgData.length) {", + " if (rcfgname == rcfgData[i].name) {", + " tests[\"Body contains added resource CFG\"] = rcfgname == rcfgData[i].name;", + " tests[\"Body contains added rcfg_value\"] = postman.getEnvironmentVariable(\"rcfg_value\") == rcfgData[i].value;", + " tests[\"Body contains added rcfg_comment\"] = postman.getEnvironmentVariable(\"rcfg_comment\") == rcfgData[i].comment;", + " tests[\"Body contains added rcfg_activate\"] = postman.getEnvironmentVariable(\"rcfg_activate\") == rcfgData[i].activate;", + " tests[\"Body contains added rcfg_instance\"] = postman.getEnvironmentVariable(\"rcfg_instance\") == rcfgData[i].instance;", + " break;", + " }", + " i++;", + " }", + " if (i == rcfgData.length)", + " tests[\"rcfg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"resourcecfg\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "02-Configure_Centreon_Broker", + "description": "", + "item": [ + { + "name": "Add broker", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"centbrokercfg\",\n \"values\": \"broker_test;{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"broker_test;name;{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List brokers", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var brokerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of brokers\"] = brokerData;", + " var i = 0;", + " while (i < brokerData.length) {", + " if (postman.getEnvironmentVariable(\"broker_name\") == brokerData[i]['config name']) {", + " tests[\"Body contains added broker_name\"] = postman.getEnvironmentVariable(\"broker_name\") == brokerData[i]['config name'];", + " tests[\"Body contains added instance_name\"] = postman.getEnvironmentVariable(\"instance_name\") == brokerData[i].instance;", + " break;", + " }", + " i++;", + " }", + " if (i == brokerData.length)", + " tests[\"broker_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"centbrokercfg\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam filename", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};filename;{{broker_filename}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam instance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};instance;{{instance_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_queue_max_size", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};event_queue_max_size;{{broker_event_queue_max_size}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cache_directory", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};cache_directory;{{broker_cache_directory}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam daemon", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};daemon;{{broker_daemon}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam stats_activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};stats_activate;{{broker_stats_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam correlation_activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};correlation_activate;{{broker_correlation_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addinput ipv4", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_name_ipv4}};ipv4;1\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get input_key ipv4", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var inputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of inputs\"] = inputData;", + " var i = 0;", + " while (i < inputData.length) {", + " if (postman.getEnvironmentVariable(\"input_name_ipv4\") == inputData[i].name) {", + " postman.setEnvironmentVariable(\"input_ipv4_id\",inputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == inputData.length){", + " tests[\"input_name_ipv4 was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};buffering_timeout;{{input_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};compression;{{input_compression}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression_buffer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};compression_buffer;{{input_compression_buffer}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression_level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};compression_level;{{input_compression_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};retry_interval;{{input_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};category;{{input_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput ca_certificate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};ca_certificate;{{input_ca_certificate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput host", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};host;{{input_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput one_peer_retention_mode", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};one_peer_retention_mode;{{input_one_peer_retention_mode}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};port;{{input_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput private_key", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};private_key;{{input_private_key}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput protocol", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};protocol;{{input_protocol}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput public_cert", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};public_cert;{{input_public_cert}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput tls", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}};tls;{{input_tls}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getinput ipv4", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var inputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of inputs\"] = inputData;", + " for (var i = 0; i < inputData.length; i++) {", + " switch (inputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added input_buffering_timeout\"] = postman.getEnvironmentVariable(\"input_buffering_timeout\") == inputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added input_category\"] = postman.getEnvironmentVariable(\"input_category\") == inputData[i]['parameter value'];", + " break;", + " case \"ca_certificate\":", + " tests[\"Body contains added input_ca_certificate\"] = postman.getEnvironmentVariable(\"input_ca_certificate\") == inputData[i]['parameter value'];", + " break;", + " case \"compression\":", + " tests[\"Body contains added input_compression\"] = postman.getEnvironmentVariable(\"input_compression\") == inputData[i]['parameter value'];", + " break;", + " case \"compression_buffer\":", + " tests[\"Body contains added input_compression_buffer\"] = postman.getEnvironmentVariable(\"input_compression_buffer\") == inputData[i]['parameter value'];", + " break;", + " case \"compression_level\":", + " tests[\"Body contains added input_compression_level\"] = postman.getEnvironmentVariable(\"input_compression_level\") == inputData[i]['parameter value'];", + " break;", + " case \"host\":", + " tests[\"Body contains added input_host\"] = postman.getEnvironmentVariable(\"input_host\") == inputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added input_name\"] = postman.getEnvironmentVariable(\"input_name_ipv4\") == inputData[i]['parameter value'];", + " break;", + " case \"one_peer_retention_mode\":", + " tests[\"Body contains added input_one_peer_retention_mode\"] = postman.getEnvironmentVariable(\"input_one_peer_retention_mode\") == inputData[i]['parameter value'];", + " break;", + " case \"port\":", + " tests[\"Body contains added port\"] = postman.getEnvironmentVariable(\"input_port\") == inputData[i]['parameter value'];", + " break;", + " case \"private_key\":", + " tests[\"Body contains added input_private_key\"] = postman.getEnvironmentVariable(\"input_private_key\") == inputData[i]['parameter value'];", + " break;", + " case \"protocol\":", + " tests[\"Body contains added input_protocol\"] = postman.getEnvironmentVariable(\"input_protocol\") == inputData[i]['parameter value'];", + " break;", + " case \"public_cert\":", + " tests[\"Body contains added input_public_cert\"] = postman.getEnvironmentVariable(\"input_public_cert\") == inputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added input_retry_interval\"] = postman.getEnvironmentVariable(\"input_retry_interval\") == inputData[i]['parameter value'];", + " break;", + " case \"tls\":", + " tests[\"Body contains added input_tls\"] = postman.getEnvironmentVariable(\"input_tls\") == intputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body containts added input_type\"] = \"ipv4\" == inputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addinput ipv6", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_name_ipv6}};ipv6;1\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get input_key ipv6", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var inputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of inputs\"] = inputData;", + " var i = 0;", + " while (i < inputData.length) {", + " if (postman.getEnvironmentVariable(\"input_name_ipv6\") == inputData[i].name) {", + " postman.setEnvironmentVariable(\"input_ipv6_id\",inputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == inputData.length){", + " tests[\"input_name_ipv6 was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};buffering_timeout;{{input_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};compression;{{input_compression}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression_buffer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};compression_buffer;{{input_compression_buffer}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression_level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};compression_level;{{input_compression_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};retry_interval;{{input_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};category;{{input_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput ca_certificate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};ca_certificate;{{input_ca_certificate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput host", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};host;{{input_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput one_peer_retention_mode", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};one_peer_retention_mode;{{input_one_peer_retention_mode}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};port;{{input_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput private_key", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};private_key;{{input_private_key}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput protocol", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};protocol;{{input_protocol}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput public_cert", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};public_cert;{{input_public_cert}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput tls", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}};tls;{{input_tls}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getinput ipv6", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var inputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of inputs\"] = inputData;", + " for (var i = 0; i < inputData.length; i++) {", + " switch (inputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added input_buffering_timeout\"] = postman.getEnvironmentVariable(\"input_buffering_timeout\") == inputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added input_category\"] = postman.getEnvironmentVariable(\"input_category\") == inputData[i]['parameter value'];", + " break;", + " case \"ca_certificate\":", + " tests[\"Body contains added input_ca_certificate\"] = postman.getEnvironmentVariable(\"input_ca_certificate\") == inputData[i]['parameter value'];", + " break;", + " case \"compression\":", + " tests[\"Body contains added input_compression\"] = postman.getEnvironmentVariable(\"input_compression\") == inputData[i]['parameter value'];", + " break;", + " case \"compression_buffer\":", + " tests[\"Body contains added input_compression_buffer\"] = postman.getEnvironmentVariable(\"input_compression_buffer\") == inputData[i]['parameter value'];", + " break;", + " case \"compression_level\":", + " tests[\"Body contains added input_compression_level\"] = postman.getEnvironmentVariable(\"input_compression_level\") == inputData[i]['parameter value'];", + " break;", + " case \"host\":", + " tests[\"Body contains added input_host\"] = postman.getEnvironmentVariable(\"input_host\") == inputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added input_name\"] = postman.getEnvironmentVariable(\"input_name_ipv6\") == inputData[i]['parameter value'];", + " break;", + " case \"one_peer_retention_mode\":", + " tests[\"Body contains added input_one_peer_retention_mode\"] = postman.getEnvironmentVariable(\"input_one_peer_retention_mode\") == inputData[i]['parameter value'];", + " break;", + " case \"port\":", + " tests[\"Body contains added port\"] = postman.getEnvironmentVariable(\"input_port\") == inputData[i]['parameter value'];", + " break;", + " case \"private_key\":", + " tests[\"Body contains added input_private_key\"] = postman.getEnvironmentVariable(\"input_private_key\") == inputData[i]['parameter value'];", + " break;", + " case \"protocol\":", + " tests[\"Body contains added input_protocol\"] = postman.getEnvironmentVariable(\"input_protocol\") == inputData[i]['parameter value'];", + " break;", + " case \"public_cert\":", + " tests[\"Body contains added input_public_cert\"] = postman.getEnvironmentVariable(\"input_public_cert\") == inputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added input_retry_interval\"] = postman.getEnvironmentVariable(\"input_retry_interval\") == inputData[i]['parameter value'];", + " break;", + " case \"tls\":", + " tests[\"Body contains added input_tls\"] = postman.getEnvironmentVariable(\"input_tls\") == intputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body containts added input_type\"] = \"ipv6\" == inputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addinput file", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_name_file}};file;1\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get input_key file", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var inputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of inputs\"] = inputData;", + " var i = 0;", + " while (i < inputData.length) {", + " if (postman.getEnvironmentVariable(\"input_name_file\") == inputData[i].name) {", + " postman.setEnvironmentVariable(\"input_file_id\",inputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == inputData.length){", + " tests[\"input_name_file was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};buffering_timeout;{{input_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};compression;{{input_compression}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression_buffer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};compression_buffer;{{input_compression_buffer}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput compression_level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};compression_level;{{input_compression_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};retry_interval;{{input_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput protocol", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};protocol;{{input_protocol}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput max_size", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};max_size;{{input_max_size}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinput path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}};path;{{input_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getinput file", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var inputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of inputs\"] = inputData;", + " for (var i = 0; i < inputData.length; i++) {", + " switch (inputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added input_buffering_timeout\"] = postman.getEnvironmentVariable(\"input_buffering_timeout\") == inputData[i]['parameter value'];", + " break;", + " case \"compression\":", + " tests[\"Body contains added input_compression\"] = postman.getEnvironmentVariable(\"input_compression\") == inputData[i]['parameter value'];", + " break;", + " case \"compression_buffer\":", + " tests[\"Body contains added input_compression_buffer\"] = postman.getEnvironmentVariable(\"input_compression_buffer\") == inputData[i]['parameter value'];", + " break;", + " case \"compression_level\":", + " tests[\"Body contains added input_compression_level\"] = postman.getEnvironmentVariable(\"input_compression_level\") == inputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added input_name\"] = postman.getEnvironmentVariable(\"input_name_file\") == inputData[i]['parameter value'];", + " break;", + " case \"protocol\":", + " tests[\"Body contains added input_protocol\"] = postman.getEnvironmentVariable(\"input_protocol\") == inputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added input_retry_interval\"] = postman.getEnvironmentVariable(\"input_retry_interval\") == inputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added input_type\"] = \"file\" == inputData[i]['parameter value'];", + " break;", + " case \"max_size\":", + " tests[\"Body contains added input_max_size\"] = postman.getEnvironmentVariable(\"input_max_size\") == inputData[i]['parameter value'];", + " break;", + " case \"path\":", + " tests[\"Body contains added input_path\"] = postman.getEnvironmentVariable(\"input_path\") == inputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addlogger file", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};logger_file_test;file;2\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get logger_key file", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " var i = 0;", + " while (i < loggerData.length) {", + " if (\"logger_file_test\" == loggerData[i].name) {", + " postman.setEnvironmentVariable(\"logger_file_id\",loggerData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == loggerData.length){", + " tests[\"logger_file_test was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger config", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};config;{{logger_config}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger debug", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};debug;{{logger_debug}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger error", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};error;{{logger_error}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};info;{{logger_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};level;{{logger_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger max_size", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};max_size;{{logger_max_size}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}};name;{{logger_name_file}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getlogger file", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " for (var i = 0; i < loggerData.length; i++) {", + " switch (loggerData[i]['parameter key'])", + " {", + " case \"config\":", + " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", + " break;", + " case \"debug\":", + " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", + " break;", + " case \"error\":", + " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", + " break;", + " case \"info\":", + " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_file\") == loggerData[i]['parameter value'];", + " break;", + " case \"level\":", + " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added logger_type\"] = \"file\" == loggerData[i]['parameter value'];", + " break;", + " case \"max_size\":", + " tests[\"Body contains added logger_max_size\"] = postman.getEnvironmentVariable(\"logger_max_size\") == loggerData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addlogger standard", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};logger_standard_test;standard;2\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get logger_key standard", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " var i = 0;", + " while (i < loggerData.length) {", + " if (\"logger_standard_test\" == loggerData[i].name) {", + " postman.setEnvironmentVariable(\"logger_standard_id\",loggerData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == loggerData.length){", + " tests[\"logger_standard_test was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger config", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};config;{{logger_config}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger debug", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};debug;{{logger_debug}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger error", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};error;{{logger_error}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};info;{{logger_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};level;{{logger_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}};name;{{logger_name_standard}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getlogger standard", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " for (var i = 0; i < loggerData.length; i++) {", + " switch (loggerData[i]['parameter key'])", + " {", + " case \"config\":", + " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", + " break;", + " case \"debug\":", + " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", + " break;", + " case \"error\":", + " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", + " break;", + " case \"info\":", + " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_standard\") == loggerData[i]['parameter value'];", + " break;", + " case \"level\":", + " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added logger_type\"] = \"standard\" == loggerData[i]['parameter value'];", + " break;", + " case \"max_size\":", + " tests[\"Body contains added logger_max_size\"] = postman.getEnvironmentVariable(\"logger_max_size\") == loggerData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addlogger syslog", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_name_syslog}};syslog;2\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get logger_key syslog", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " var i = 0;", + " while (i < loggerData.length) {", + " if (postman.getEnvironmentVariable(\"logger_name_syslog\") == loggerData[i].name) {", + " postman.setEnvironmentVariable(\"logger_syslog_id\",loggerData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == loggerData.length){", + " tests[\"logger_name_syslog was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger config", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};config;{{logger_config}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger debug", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};debug;{{logger_debug}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger error", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};error;{{logger_error}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};info;{{logger_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}};level;{{logger_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getlogger syslog", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " for (var i = 0; i < loggerData.length; i++) {", + " switch (loggerData[i]['parameter key'])", + " {", + " case \"config\":", + " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", + " break;", + " case \"debug\":", + " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", + " break;", + " case \"error\":", + " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", + " break;", + " case \"info\":", + " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_syslog\") == loggerData[i]['parameter value'];", + " break;", + " case \"level\":", + " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added logger_type\"] = \"syslog\" == loggerData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addlogger monitoring", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};logger_monitoring_test;monitoring;2\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get logger_key monitoring", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " var i = 0;", + " while (i < loggerData.length) {", + " if (\"logger_monitoring_test\" == loggerData[i].name) {", + " postman.setEnvironmentVariable(\"logger_monitoring_id\",loggerData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == loggerData.length){", + " tests[\"logger_monitoring_test was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger config", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};config;{{logger_config}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger debug", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};debug;{{logger_debug}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger error", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};error;{{logger_error}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};info;{{logger_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};level;{{logger_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setlogger name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}};name;{{logger_name_monitoring}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getlogger monitoring", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var loggerData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of loggers\"] = loggerData;", + " for (var i = 0; i < loggerData.length; i++) {", + " switch (loggerData[i]['parameter key'])", + " {", + " case \"config\":", + " tests[\"Body contains added logger_config\"] = postman.getEnvironmentVariable(\"logger_config\") == loggerData[i]['parameter value'];", + " break;", + " case \"debug\":", + " tests[\"Body contains added logger_debug\"] = postman.getEnvironmentVariable(\"logger_debug\") == loggerData[i]['parameter value'];", + " break;", + " case \"error\":", + " tests[\"Body contains added logger_error\"] = postman.getEnvironmentVariable(\"logger_error\") == loggerData[i]['parameter value'];", + " break;", + " case \"info\":", + " tests[\"Body contains added logger_info\"] = postman.getEnvironmentVariable(\"logger_info\") == loggerData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added logger_name\"] = postman.getEnvironmentVariable(\"logger_name_monitoring\") == loggerData[i]['parameter value'];", + " break;", + " case \"level\":", + " tests[\"Body contains added logger_level\"] = postman.getEnvironmentVariable(\"logger_level\") == loggerData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added logger_type\"] = \"monitoring\" == loggerData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getlogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addoutput ipv4", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_ipv4}};ipv4;4\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get output_key ipv4", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " var i = 0;", + " while (i < outputData.length) {", + " if (postman.getEnvironmentVariable(\"output_name_ipv4\") == outputData[i].name) {", + " postman.setEnvironmentVariable(\"output_ipv4_id\",outputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == outputData.length){", + " tests[\"output_name_ipv4 was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};compression;{{output_compression}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression_buffer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};compression_buffer;{{output_compression_buffer}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression_level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};compression_level;{{output_compression_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput failover", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};failover;{{output_failover}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};retry_interval;{{output_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};category;{{output_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput ca_certificate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};ca_certificate;{{output_ca_certificate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput host", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};host;{{output_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput one_peer_retention_mode", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};one_peer_retention_mode;{{output_one_peer_retention_mode}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};port;{{output_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput private_key", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};private_key;{{output_private_key}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput protocol", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};protocol;{{output_protocol}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput public_cert", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};public_cert;{{output_public_cert}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput tls", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}};tls;{{output_tls}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getoutput ipv4", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " for (var i = 0; i < outputData.length; i++) {", + " switch (outputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", + " break;", + " case \"ca_certificate\":", + " tests[\"Body contains added output_ca_certificate\"] = postman.getEnvironmentVariable(\"output_ca_certificate\") == outputData[i]['parameter value'];", + " break;", + " case \"compression\":", + " tests[\"Body contains added output_compression\"] = postman.getEnvironmentVariable(\"output_compression\") == outputData[i]['parameter value'];", + " break;", + " case \"compression_buffer\":", + " tests[\"Body contains added output_compression_buffer\"] = postman.getEnvironmentVariable(\"output_compression_buffer\") == outputData[i]['parameter value'];", + " break;", + " case \"compression_level\":", + " tests[\"Body contains added output_compression_level\"] = postman.getEnvironmentVariable(\"output_compression_level\") == outputData[i]['parameter value'];", + " break;", + " case \"failover\":", + " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", + " break;", + " case \"host\":", + " tests[\"Body contains added output_host\"] = postman.getEnvironmentVariable(\"output_host\") == outputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_ipv4\") == outputData[i]['parameter value'];", + " break;", + " case \"one_peer_retention_mode\":", + " tests[\"Body contains added output_one_peer_retention\"] = postman.getEnvironmentVariable(\"output_one_peer_retention_mode\") == outputData[i]['parameter value'];", + " break;", + " case \"port\":", + " tests[\"Body contains added output_port\"] = postman.getEnvironmentVariable(\"output_port\") == outputData[i]['parameter value'];", + " break;", + " case \"private_key\":", + " tests[\"Body contains added output_private_key\"] = postman.getEnvironmentVariable(\"output_private_key\") == outputData[i]['parameter value'];", + " break;", + " case \"protocol\":", + " tests[\"Body contains added output_protocol\"] = postman.getEnvironmentVariable(\"output_protocol\") == outputData[i]['parameter value'];", + " break;", + " case \"public_cert\":", + " tests[\"Body contains added output_public_cert\"] = postman.getEnvironmentVariable(\"output_public_cert\") == outputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"tls\":", + " tests[\"Body contains added output_tls\"] = postman.getEnvironmentVariable(\"output_tls\") == outputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added output_type\"] = \"ipv4\" == outputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addoutput ipv6", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_ipv6}};ipv6;4\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get output_key ipv6", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " var i = 0;", + " while (i < outputData.length) {", + " if (postman.getEnvironmentVariable(\"output_name_ipv6\") == outputData[i].name) {", + " postman.setEnvironmentVariable(\"output_ipv6_id\",outputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == outputData.length){", + " tests[\"output_name_ipv6 was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};compression;{{output_compression}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression_buffer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};compression_buffer;{{output_compression_buffer}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression_level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};compression_level;{{output_compression_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput failover", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};failover;{{output_failover}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};retry_interval;{{output_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};category;{{output_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput ca_certificate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};ca_certificate;{{output_ca_certificate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput host", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};host;{{output_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput one_peer_retention_mode", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};one_peer_retention_mode;{{output_one_peer_retention_mode}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};port;{{output_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput private_key", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};private_key;{{output_private_key}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput protocol", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};protocol;{{output_protocol}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput public_cert", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};public_cert;{{output_public_cert}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput tls", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}};tls;{{output_tls}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getoutput ipv6", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " for (var i = 0; i < outputData.length; i++) {", + " switch (outputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", + " break;", + " case \"ca_certificate\":", + " tests[\"Body contains added output_ca_certificate\"] = postman.getEnvironmentVariable(\"output_ca_certificate\") == outputData[i]['parameter value'];", + " break;", + " case \"compression\":", + " tests[\"Body contains added output_compression\"] = postman.getEnvironmentVariable(\"output_compression\") == outputData[i]['parameter value'];", + " break;", + " case \"compression_buffer\":", + " tests[\"Body contains added output_compression_buffer\"] = postman.getEnvironmentVariable(\"output_compression_buffer\") == outputData[i]['parameter value'];", + " break;", + " case \"compression_level\":", + " tests[\"Body contains added output_compression_level\"] = postman.getEnvironmentVariable(\"output_compression_level\") == outputData[i]['parameter value'];", + " break;", + " case \"failover\":", + " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", + " break;", + " case \"host\":", + " tests[\"Body contains added output_host\"] = postman.getEnvironmentVariable(\"output_host\") == outputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_ipv6\") == outputData[i]['parameter value'];", + " break;", + " case \"one_peer_retention_mode\":", + " tests[\"Body contains added output_one_peer_retention\"] = postman.getEnvironmentVariable(\"output_one_peer_retention_mode\") == outputData[i]['parameter value'];", + " break;", + " case \"port\":", + " tests[\"Body contains added output_port\"] = postman.getEnvironmentVariable(\"output_port\") == outputData[i]['parameter value'];", + " break;", + " case \"private_key\":", + " tests[\"Body contains added output_private_key\"] = postman.getEnvironmentVariable(\"output_private_key\") == outputData[i]['parameter value'];", + " break;", + " case \"protocol\":", + " tests[\"Body contains added output_protocol\"] = postman.getEnvironmentVariable(\"output_protocol\") == outputData[i]['parameter value'];", + " break;", + " case \"public_cert\":", + " tests[\"Body contains added output_public_cert\"] = postman.getEnvironmentVariable(\"output_public_cert\") == outputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"tls\":", + " tests[\"Body contains added output_tls\"] = postman.getEnvironmentVariable(\"output_tls\") == outputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added output_type\"] = \"ipv6\" == outputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addoutput file", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_file}};file;4\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get output_key file", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " var i = 0;", + " while (i < outputData.length) {", + " if (postman.getEnvironmentVariable(\"output_name_file\") == outputData[i].name) {", + " postman.setEnvironmentVariable(\"output_file_id\",outputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == outputData.length){", + " tests[\"output_name_file was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};category;{{output_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};compression;{{output_compression}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression_buffer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};compression_buffer;{{output_compression_buffer}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput compression_level", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};compression_level;{{output_compression_level}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput failover", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};failover;{{output_failover}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};retry_interval;{{output_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput protocol", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};protocol;{{output_protocol}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput max_size", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};max_size;{{output_max_size}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}};path;{{output_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getoutput file", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " for (var i = 0; i < outputData.length; i++) {", + " switch (outputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", + " break;", + " case \"compression\":", + " tests[\"Body contains added output_compression\"] = postman.getEnvironmentVariable(\"output_compression\") == outputData[i]['parameter value'];", + " break;", + " case \"compression_buffer\":", + " tests[\"Body contains added output_compression_buffer\"] = postman.getEnvironmentVariable(\"output_compression_buffer\") == outputData[i]['parameter value'];", + " break;", + " case \"compression_level\":", + " tests[\"Body contains added output_compression_level\"] = postman.getEnvironmentVariable(\"output_compression_level\") == outputData[i]['parameter value'];", + " break;", + " case \"max_size\":", + " tests[\"Body contains added output_max_size\"] = postman.getEnvironmentVariable(\"output_max_size\") == outputData[i]['parameter value'];", + " break;", + " case \"failover\":", + " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_file\") == outputData[i]['parameter value'];", + " break;", + " case \"path\":", + " tests[\"Body contains added output_path\"] = postman.getEnvironmentVariable(\"output_path\") == outputData[i]['parameter value'];", + " break;", + " case \"protocol\":", + " tests[\"Body contains added output_protocol\"] = postman.getEnvironmentVariable(\"output_protocol\") == outputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added output_type\"] = \"file\" == outputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addoutput rrd", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_rrd}};rrd;4\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get output_key rrd", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " var i = 0;", + " while (i < outputData.length) {", + " if (postman.getEnvironmentVariable(\"output_name_rrd\") == outputData[i].name) {", + " postman.setEnvironmentVariable(\"output_rrd_id\",outputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == outputData.length){", + " tests[\"output_name_rrd was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};category;{{output_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput failover", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};failover;{{output_failover}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};retry_interval;{{output_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};port;{{output_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};path;{{output_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput metrics_path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};metrics_path;{{output_metrics_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput status_path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};status_path;{{output_status_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput write_metrics", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};write_metrics;{{output_write_metrics}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput write_status", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}};write_status;{{output_write_status}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getoutput rrd", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " for (var i = 0; i < outputData.length; i++) {", + " switch (outputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", + " break;", + " case \"failover\":", + " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", + " break;", + " case \"metrics_path\":", + " tests[\"Body contains added output_metrics_path\"] = postman.getEnvironmentVariable(\"output_metrics_path\") == outputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_rrd\") == outputData[i]['parameter value'];", + " break;", + " case \"path\":", + " tests[\"Body contains added output_path\"] = postman.getEnvironmentVariable(\"output_path\") == outputData[i]['parameter value'];", + " break;", + " case \"port\":", + " tests[\"Body contains added output_port\"] = postman.getEnvironmentVariable(\"output_port\") == outputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"status_path\":", + " tests[\"Body contains added output_status_path\"] = postman.getEnvironmentVariable(\"output_status_path\") == outputData[i]['parameter value'];", + " break;", + " case \"store_in_data\":", + " tests[\"Body contains added output_store_in_data\"] = postman.getEnvironmentVariable(\"output_store_in_data_bin\") == outputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added output_type\"] = \"rrd\" == outputData[i]['parameter value'];", + " break;", + " case \"write_metrics\":", + " tests[\"Body contains added output_write_metrics\"] = postman.getEnvironmentVariable(\"output_write_status\") == outputData[i]['parameter value'];", + " break;", + " case \"write_status\":", + " tests[\"Body contains added output_write_status\"] = postman.getEnvironmentVariable(\"output_write_status\") == outputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addoutput storage", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_storage}};storage;4\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get output_key storage", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " var i = 0;", + " while (i < outputData.length) {", + " if (postman.getEnvironmentVariable(\"output_name_storage\") == outputData[i].name) {", + " postman.setEnvironmentVariable(\"output_storage_id\",outputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == outputData.length){", + " tests[\"output_name_storage was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};category;{{output_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput failover", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};failover;{{output_failover}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};retry_interval;{{output_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput check_replication", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};check_replication;{{output_check_replication}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput store_in_data_bin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};store_in_data_bin;{{output_store_in_data_bin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_host", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_host;{{output_db_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_name;{{output_db_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_password", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_password;{{output_db_password}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_port;{{output_db_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_type", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_type;{{output_db_type}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_user", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};db_user;{{output_db_user}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};interval;{{output_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput length", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};length;{{output_length}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput queries_per_transaction", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};queries_per_transaction;{{output_queries_per_transaction}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput read_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};read_timeout;{{output_read_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput rebuild_check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}};rebuild_check_interval;{{output_rebuild_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getoutput storage", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " for (var i = 0; i < outputData.length; i++) {", + " switch (outputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", + " break;", + " case \"check_replication\":", + " tests[\"Body contains added output_check_replication\"] = postman.getEnvironmentVariable(\"output_check_replication\") == outputData[i]['parameter value'];", + " break;", + " case \"db_host\":", + " tests[\"Body contains added output_db_host\"] = postman.getEnvironmentVariable(\"output_db_host\") == outputData[i]['parameter value'];", + " break;", + " case \"db_name\":", + " tests[\"Body contains added output_db_name\"] = postman.getEnvironmentVariable(\"output_db_name\") == outputData[i]['parameter value'];", + " break;", + " case \"db_password\":", + " tests[\"Body contains added output_db_password\"] = postman.getEnvironmentVariable(\"output_db_password\") == outputData[i]['parameter value'];", + " break;", + " case \"db_port\":", + " tests[\"Body contains added output_db_port\"] = postman.getEnvironmentVariable(\"output_db_port\") == outputData[i]['parameter value'];", + " break;", + " case \"db_type\":", + " tests[\"Body contains added output_db_type\"] = postman.getEnvironmentVariable(\"output_db_type\") == outputData[i]['parameter value'];", + " break;", + " case \"db_user\":", + " tests[\"Body contains added output_db_user\"] = postman.getEnvironmentVariable(\"output_db_user\") == outputData[i]['parameter value'];", + " break;", + " case \"failover\":", + " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", + " break;", + " case \"interval\":", + " tests[\"Body contains added output_interval\"] = postman.getEnvironmentVariable(\"output_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_storage\") == outputData[i]['parameter value'];", + " break;", + " case \"queries_per_transaction\":", + " tests[\"Body contains added output_queries_per_transaction\"] =postman.getEnvironmentVariable(\"output_queries_per_transaction\") == outputData[i]['parameter value'];", + " break;", + " case \"read_timeout\":", + " tests[\"Body contains added output_read_timeout\"] = postman.getEnvironmentVariable(\"output_read_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"rebuild_check_interval\":", + " tests[\"Body contains added output_rebuild_check_interval\"] = postman.getEnvironmentVariable(\"output_rebuild_check_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"store_in_data_bin\":", + " tests[\"Body contains added output_store_in_data_bin\"] = postman.getEnvironmentVariable(\"output_store_in_data_bin\") == outputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added output_type\"] = \"storage\" == outputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addoutput sql", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_name_sql}};sql;4\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get output_key sql", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " var i = 0;", + " while (i < outputData.length) {", + " if (postman.getEnvironmentVariable(\"output_name_sql\") == outputData[i].name) {", + " postman.setEnvironmentVariable(\"output_sql_id\",outputData[i].id)", + " break;", + " }", + " i++;", + " }", + " if (i == outputData.length){", + " tests[\"output_name_sql was found\"] = false;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput buffering_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};buffering_timeout;{{output_buffering_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};category;{{output_category}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput failover", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};failover;{{output_failover}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput retry_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};retry_interval;{{output_retry_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput check_replication", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};check_replication;{{output_check_replication}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput cleanup_check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};cleanup_check_interval;{{output_cleanup_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_host", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_host;{{output_db_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_name;{{output_db_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_password", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_password;{{output_db_password}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_port;{{output_db_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_type", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_type;{{output_db_type}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput db_user", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};db_user;{{output_db_user}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput instance_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};instance_timeout;{{output_instance_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput queries_per_transaction", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};queries_per_transaction;{{output_queries_per_transaction}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setoutput read_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}};read_timeout;{{output_read_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getoutput sql", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var outputData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of outputs\"] = outputData;", + " for (var i = 0; i < outputData.length; i++) {", + " switch (outputData[i]['parameter key'])", + " {", + " case \"buffering_timeout\":", + " tests[\"Body contains added output_buffering_timeout\"] = postman.getEnvironmentVariable(\"output_buffering_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"category\":", + " tests[\"Body contains added output_category\"] = postman.getEnvironmentVariable(\"output_category\") == outputData[i]['parameter value'];", + " break;", + " case \"check_replication\":", + " tests[\"Body contains added output_check_replication\"] = postman.getEnvironmentVariable(\"output_check_replication\") == outputData[i]['parameter value'];", + " break;", + " case \"cleanup_check_interval\":", + " tests[\"Body contains added output_cleanup_check_interval\"] = postman.getEnvironmentVariable(\"output_cleanup_check_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"db_host\":", + " tests[\"Body contains added output_db_host\"] = postman.getEnvironmentVariable(\"output_db_host\") == outputData[i]['parameter value'];", + " break;", + " case \"db_name\":", + " tests[\"Body contains added output_db_name\"] = postman.getEnvironmentVariable(\"output_db_name\") == outputData[i]['parameter value'];", + " break;", + " case \"db_password\":", + " tests[\"Body contains added output_db_password\"] = postman.getEnvironmentVariable(\"output_db_password\") == outputData[i]['parameter value'];", + " break;", + " case \"db_port\":", + " tests[\"Body contains added output_db_port\"] = postman.getEnvironmentVariable(\"output_db_port\") == outputData[i]['parameter value'];", + " break;", + " case \"db_type\":", + " tests[\"Body contains added output_db_type\"] = postman.getEnvironmentVariable(\"output_db_type\") == outputData[i]['parameter value'];", + " break;", + " case \"db_user\":", + " tests[\"Body contains added output_db_user\"] = postman.getEnvironmentVariable(\"output_db_user\") == outputData[i]['parameter value'];", + " break;", + " case \"failover\":", + " tests[\"Body contains added output_failover\"] = postman.getEnvironmentVariable(\"output_failover\") == outputData[i]['parameter value'];", + " break;", + " case \"instance_timeout\":", + " tests[\"Body contains added output_instance_timeout\"] = postman.getEnvironmentVariable(\"output_instance_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"name\":", + " tests[\"Body contains added output_name\"] = postman.getEnvironmentVariable(\"output_name_sql\") == outputData[i]['parameter value'];", + " break;", + " case \"queries_per_transaction\":", + " tests[\"Body contains added output_queries_per_transaction\"] =postman.getEnvironmentVariable(\"output_queries_per_transaction\") == outputData[i]['parameter value'];", + " break;", + " case \"read_timeout\":", + " tests[\"Body contains added output_read_timeout\"] = postman.getEnvironmentVariable(\"output_read_timeout\") == outputData[i]['parameter value'];", + " break;", + " case \"retry_interval\":", + " tests[\"Body contains added output_retry_interval\"] = postman.getEnvironmentVariable(\"output_retry_interval\") == outputData[i]['parameter value'];", + " break;", + " case \"type\":", + " tests[\"Body contains added output_type\"] = \"sql\" == outputData[i]['parameter value'];", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getoutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gettypelist", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"gettypelist\",\n \"object\": \"centbrokercfg\",\n \"values\": \"output\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getfieldlist", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getfieldlist\",\n \"object\": \"centbrokercfg\",\n \"values\": \"ipv4\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "10-Timeperiods", + "description": "", + "item": [ + { + "name": "Add tp", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"tp\",\n \"values\": \"test_name;test_alias\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"test_name;name;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};alias;{{tp_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam sunday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam monday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam tuesday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam wednesday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam thursday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam friday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam include", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};include;{{tp_include}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam exclude", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}};exclude;{{tp_exclude}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List timeperiod", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var tpData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of time periods\"] = tpData;", + " var i = 0;", + " while (i < tpData.length) {", + " if (postman.getEnvironmentVariable(\"tp_name\") == tpData[i].name) {", + " tests[\"Body contains added name\"] = postman.getEnvironmentVariable(\"tp_name\") == tpData[i].name;", + " tests[\"Body contains added alias\"] = postman.getEnvironmentVariable(\"tp_alias\") == tpData[i].alias;", + " tests[\"Body contains added sunday\"] = postman.getEnvironmentVariable(\"tp_sunday\") == tpData[i].sunday;", + " tests[\"Body contains added monday\"] = postman.getEnvironmentVariable(\"tp_monday\") == tpData[i].monday;", + " tests[\"Body contains added tuesday\"] = postman.getEnvironmentVariable(\"tp_tuesday\") == tpData[i].tuesday;", + " tests[\"Body contains added wednesday\"] = postman.getEnvironmentVariable(\"tp_wednesday\") == tpData[i].wednesday;", + " tests[\"Body contains added thursday\"] = postman.getEnvironmentVariable(\"tp_thursday\") == tpData[i].thursday;", + " tests[\"Body contains added friday\"] = postman.getEnvironmentVariable(\"tp_friday\") == tpData[i].friday;", + " tests[\"Body contains added saturday\"] = postman.getEnvironmentVariable(\"tp_saturday\") == tpData[i].saturday;", + " break;", + " }", + " i++;", + " }", + " if (i == tpData.length)", + " tests[\"tp_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"tp\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Set exception", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setexception\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}};{{exception_day}};{{exception_timerange}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get exceptions", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var exceptionData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of exceptions\"] = exceptionData;", + " var i = 0;", + " while (i < exceptionData.length) {", + " if (postman.getEnvironmentVariable(\"exception_day\") == exceptionData[i].days) {", + " tests[\"Body contains added exception day\"] = postman.getEnvironmentVariable(\"exception_day\") == exceptionData[i].days;", + " tests[\"Body contains added exception timerange\"] = postman.getEnvironmentVariable(\"exception_timerange\") == exceptionData[i].timerange;", + " break;", + " }", + " i++;", + " }", + " if (i == tpData.length)", + " tests[\"tp_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getexception\",\n \"object\":\"tp\",\n \"values\": \"{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del exception", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delexception\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}};{{exception_day}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "11-Commands", + "description": "Tests all commands to manage commands.", + "item": [ + { + "name": "Add 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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"cmd\",\n \"values\": \"cmd-test;misc;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"cmd-test;name;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam line", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};line;{{command_line}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam type", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};type;{{command_type}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam graph", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};graph;{{command_graph}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam example", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};example;{{command_example}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};comment;{{command_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List commands", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var commandData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of commands\"] = commandData;", + " var i = 0;", + " while (i < commandData.length) {", + " if (postman.getEnvironmentVariable(\"command_name\") == commandData[i].name) {", + " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == commandData[i].name;", + " tests[\"Body contains added command_type\"] = postman.getEnvironmentVariable(\"command_type\") == commandData[i].type;", + " tests[\"Body contains added command_line\"] = postman.getEnvironmentVariable(\"command_line\") == commandData[i].line;", + " break;", + " }", + " i++;", + " }", + " if (i == commandData.length)", + " tests[\"command_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"cmd\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "20-Contacts templates", + "description": "Tests all commands to manage contact.", + "item": [ + { + "name": "Add ctpl", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"contacttpl\",\n \"values\": \"test_name;test_alias;test@localhost;pwd;0;0;en_US;Idap\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"test_alias;name;{{ctpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"test_alias;alias;{{ctpl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};comment;{{ctpl_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam hostnotifcmd", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};hostnotifcmd;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam svcnotifcmd", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};svcnotifcmd;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam hostnotifperiod", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};hostnotifperiod;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam svcnotifperiod", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};svcnotifperiod;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam hostnotifopt", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};hostnotifopt;{{contact_hostnotifopt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam svcnotifopt", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};servicenotifopt;{{contact_svcnotifopt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address1", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address1;{{contact_address1}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address2;{{contact_address2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address3", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address3;{{contact_address3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address4", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address4;{{contact_address4}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address5", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address5;{{contact_address5}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address6", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};address6;{{contact_address6}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create ctpl2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_name2}};{{ctpl_alias2}};test@localhost;pwd;0;0;en_US;Idap\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam template", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}};template;{{ctpl_alias2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Enable", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"enable\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Disable", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"disable\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "21-Contacts", + "description": "Tests all commands to manage contact.", + "item": [ + { + "name": "Add contact", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"contact\",\n \"values\": \"test_name;test_alias;test@localhost;pwd;0;0;en_US;Idap\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"test_alias;name;{{contact_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"test_alias;alias;{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};comment;{{contact_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam mail", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};email;{{contact_mail}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam password", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};password;{{contact_pwd}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};access;{{contact_access}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam language", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};language;{{contact_language}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam GUI access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};access;{{contact_GUI_access}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam admin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;{{contact_admin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam authtype", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};authtype;{{contact_authentication}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam hostnotifcmd", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifcmd;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam svcnotifcmd", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifcmd;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam hostnotifperiod", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifperiod;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam svcnotifperiod", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifperiod;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam hostnotifopt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam svcnotifopt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam address1", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address1;{{contact_address1}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address2;{{contact_address2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address3", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address3;{{contact_address3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address4", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address4;{{contact_address4}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address5", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address5;{{contact_address5}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address6", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};address6;{{contact_address6}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_dn", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};ldap_dn;{{contact_ldap_dn}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam autologin_key", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};autologin_key;{{contact_autologin_key}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam template", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};template;{{ctpl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"enable\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Disable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"disable\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List contact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_name\") == contactData[i].name) {", + " tests[\"Body contains added contact_name\"] = postman.getEnvironmentVariable(\"contact_name\") == contactData[i].name;", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].alias;", + " tests[\"Body contains added contact_email\"] = postman.getEnvironmentVariable(\"contact_mail\") == contactData[i].email;", + " tests[\"Body contains added contact_GUI_access\"] = postman.getEnvironmentVariable(\"contact_GUI_access\") == contactData[i]['gui access'];", + " tests[\"Body contains added contact_admin\"] = postman.getEnvironmentVariable(\"contact_admin\") == contactData[i].admin;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"contact\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Set contact non admin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;0\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create contact-2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"contact\",\n \"values\": \"{{contact_name2}};{{contact_alias2}};test@localhost;pwd;0;0;en_US;Idap\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Set contact non admin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;0\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "22-Contactgroups", + "description": "Tests all commands to manage contact groups.", + "item": [ + { + "name": "Add contact group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"cg\",\n \"values\": \"test_name;test_alias\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cg\",\n \"values\": \"test_name;name;{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};alias;{{cg_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"enable\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Disable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"disable\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", + " {", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_alias was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;", + "" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List contact group", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name)", + " {", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " tests[\"Body contains added cg_alias\"] = postman.getEnvironmentVariable(\"cg_alias\") == cgData[i].alias;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"cg\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "30-Hosts_Templates", + "description": "", + "item": [ + { + "name": "Create host template2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name2}};{{htpl_name2}};0.0.0.0;;central;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add htpl", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"test_host;test_host;0.0.0.0;{{htpl_name2}};central;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"test_host;name;{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam 2d_coords", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};2d_coords;{{host_2d_coords}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam 3d_coords", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};3d_coords;{{host_3d_coords}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam action_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};action_url;{{host_action_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};activate;{{host_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam active_checks_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};active_checks_enabled;{{host_active_checks_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};address;{{host_address}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};alias;{{host_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List hosts", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hostData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of hosts\"] = hostData;", + " var i = 0;", + " while (i < hostData.length) {", + " if (postman.getEnvironmentVariable(\"htpl_name\") == hostData[i].name) {", + " tests[\"Body contains added host\"] = postman.getEnvironmentVariable(\"htpl_name\") == hostData[i].name;", + " tests[\"Body contains added host_alias\"] = postman.getEnvironmentVariable(\"host_alias\") == hostData[i].alias;", + " tests[\"Body contains added host_address\"] = postman.getEnvironmentVariable(\"host_address\") == hostData[i].address;", + " tests[\"Body contains added host_activate\"] = postman.getEnvironmentVariable(\"host_activate\") == hostData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == hostData.length)", + " tests[\"htpl_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"show\",\n \"object\":\"htpl\"\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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_command_arguments", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_command_arguments;{{command_example}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_interval;{{host_normal_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_freshness", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_freshness;{{host_check_freshness}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};checks_enabled;{{host_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam contact_additive_inheritance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};contact_additive_inheritance;{{host_contact_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cg_additive_inheritance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};cg_additive_inheritance;{{host_cg_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};event_handler;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_arg", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};event_handler_arguments;{{command_example}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};event_handler_enabled;{{host_event_handler_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam first_notification_delay", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};first_notification_delay;{{host_first_notif_delay}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam flap_detection_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};flap_detection_enabled;{{host_flap_detect_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam host_low_flap_threshold", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};host_low_flap_threshold;{{host_low_flap}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam host_high_flap_threshold", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};host_high_flap_threshold;{{host_high_flap}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam flap_detection_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};flap_detection_options;{{host_flap_detect_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};icon_image;{{host_icon_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image_alt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};icon_image_alt;{{host_icon_image_alt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam max_check_attempts", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam notes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notes;{{host_notes}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notes_url;{{host_notes_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notifications_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notifications_enabled;{{host_notif_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notification_interval;{{host_notif_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notification_options;{{host_notif_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};notification_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam recovery_notif_delay", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};recovery_notification_delay;{{host_recovery_notif_delay}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam obsess_over_host", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};obsess_over_host;{{host_obsess_over_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam passive_checks_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};passive_checks_enabled;{{host_passive_checks_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam process_perf_data", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};process_perf_data;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_status_info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};retain_status_information;{{host_retain_status_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_nonstatus_info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};retain_nonstatus_information;{{host_retain_nonstatus_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retry_check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};retry_check_interval;{{host_retry_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam snmp_community", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam snmp_version", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": "Setparam stalking_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};stalking_options;{{host_stalking_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam statusmap_image", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};statusmap_image;{{host_statusmap_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam host_notif_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};host_notification_options;{{host_notification_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam timezone", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};timezone;{{host_timezone}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmacro", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setmacro\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{host_macro_name}};{{host_macro_value}};{{host_is_password}};{{host_macro_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmacro", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var macroData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of macros\"] = macroData;", + " var i = 0;", + " while (i < macroData.length) {", + " if (postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name']) {", + " tests[\"Body contains added macro\"] = postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name'];", + " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"host_macro_value\") == macroData[i]['macro value'];", + " tests[\"Body contains added macro_is_password\"] = postman.getEnvironmentVariable(\"host_is_password\") == macroData[i].is_password;", + " tests[\"Body contains added macro_description\"] = postman.getEnvironmentVariable(\"host_macro_description\") == macroData[i].description;", + " break;", + " }", + " i++;", + " }", + " if (i == macroData.length)", + " tests[\"host_macro_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getmacro\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmacro", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"delmacro\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{host_macro_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create host template3", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name3}};test_host;0.0.0.0;;central;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addtemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"addtemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deltemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"deltemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Settemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"settemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gettemplate", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var templateData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of templates\"] = templateData;", + " var i = 0;", + " while (i < templateData.length) {", + " if (postman.getEnvironmentVariable(\"htpl_name3\") == templateData[i].name) {", + " tests[\"Body contains added htpl_name3\"] = postman.getEnvironmentVariable(\"htpl_name3\") == templateData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == templateData.length)", + " tests[\"htpl_name3 was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"gettemplate\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addparent\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delparent\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparent\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getparent", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var parentData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of parents\"] = parentData;", + " var i = 0;", + " while (i < parentData.length) {", + " if (postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name) {", + " tests[\"Body contains added host_name2\"] = postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == parentData.length)", + " tests[\"host_name2 was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getparent\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontactgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getcontactgroup\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_alias was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getcontact\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add host group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"test_name;test_alias\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"test_name;name;{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gethostgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = hgData;", + " var i = 0;", + " while (i < hgData.length) {", + " if (postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name) {", + " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == hgData.length)", + " tests[\"hg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"gethostgroup\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add host category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Set hc 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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setseverity", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Unsetseverity", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"enable\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Disable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"disable\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "31-Hosts", + "description": "Tests all commands to manage hosts", + "item": [ + { + "name": "Add host", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"test_host;test_host;0.0.0.0;{{htpl_name}};central;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"test_host;name;{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam 2d_coords", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};2d_coords;{{host_2d_coords}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam 3d_coords", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};3d_coords;{{host_3d_coords}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam action_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};action_url;{{host_action_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};activate;{{host_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam active_checks_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};active_checks_enabled;{{host_active_checks_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam address", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};address;{{host_address}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};alias;{{host_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List hosts", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hostData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of hosts\"] = hostData;", + " var i = 0;", + " while (i < hostData.length) {", + " if (postman.getEnvironmentVariable(\"host_name\") == hostData[i].name) {", + " tests[\"Body contains added host\"] = postman.getEnvironmentVariable(\"host_name\") == hostData[i].name;", + " tests[\"Body contains added host_alias\"] = postman.getEnvironmentVariable(\"host_alias\") == hostData[i].alias;", + " tests[\"Body contains added host_address\"] = postman.getEnvironmentVariable(\"host_address\") == hostData[i].address;", + " tests[\"Body contains added host_activate\"] = postman.getEnvironmentVariable(\"host_activate\") == hostData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == hostData.length)", + " tests[\"host_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"show\",\n \"object\":\"host\"\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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_command_arguments", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_command_arguments;{{command_example}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_interval;{{host_normal_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_freshness", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_freshness;{{host_check_freshness}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};checks_enabled;{{host_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam contact_additive_inheritance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};contact_additive_inheritance;{{host_contact_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cg_additive_inheritance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};cg_additive_inheritance;{{host_cg_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};event_handler;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_arg", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};event_handler_arguments;{{command_example}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};event_handler_enabled;{{host_event_handler_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam first_notification_delay", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};first_notification_delay;{{host_first_notif_delay}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam flap_detection_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};flap_detection_enabled;{{host_flap_detect_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam host_low_flap_threshold", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};host_low_flap_threshold;{{host_low_flap}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam host_high_flap_threshold", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};host_high_flap_threshold;{{host_high_flap}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam flap_detection_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};flap_detection_options;{{host_flap_detect_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};icon_image;{{host_icon_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image_alt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};icon_image_alt;{{host_icon_image_alt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam max_check_attempts", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};max_check_attempts;{{host_max_check_attempts}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notes;{{host_notes}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notes_url;{{host_notes_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notifications_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notifications_enabled;{{host_notif_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notification_interval;{{host_notif_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notification_options;{{host_notif_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};notification_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam recovery_notif_delay", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};recovery_notification_delay;{{host_recovery_notif_delay}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam obsess_over_host", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};obsess_over_host;{{host_obsess_over_host}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam passive_checks_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};passive_checks_enabled;{{host_passive_checks_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam process_perf_data", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};process_perf_data;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_status_info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};retain_status_information;{{host_retain_status_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_nonstatus_info", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};retain_nonstatus_information;{{host_retain_nonstatus_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retry_check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};retry_check_interval;{{host_retry_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam snmp_community", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};snmp_community;{{host_snmp_community}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam snmp_version", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};snmp_version;{{host_snmp_version}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam stalking_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};stalking_options;{{host_stalking_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam statusmap_image", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};statusmap_image;{{host_statusmap_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam host_notif_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};host_notification_options;{{host_notification_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam timezone", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};timezone;{{host_timezone}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setinstance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setinstance\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmacro", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setmacro\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{host_macro_name}};{{host_macro_value}};{{host_is_password}};{{host_macro_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmacro", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var macroData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of macros\"] = macroData;", + " var i = 0;", + " while (i < macroData.length) {", + " if (postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name']) {", + " tests[\"Body contains added macro\"] = postman.getEnvironmentVariable(\"host_macro_name\") == macroData[i]['macro name'];", + " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"host_macro_value\") == macroData[i]['macro value'];", + " tests[\"Body contains added macro_is_password\"] = postman.getEnvironmentVariable(\"host_is_password\") == macroData[i].is_password;", + " tests[\"Body contains added macro_description\"] = postman.getEnvironmentVariable(\"host_macro_description\") == macroData[i].description;", + " break;", + " }", + " i++;", + " }", + " if (i == macroData.length)", + " tests[\"host_macro_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getmacro\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmacro", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"delmacro\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{host_macro_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addtemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"addtemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deltemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"deltemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Settemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"settemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gettemplate", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var templateData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of templates\"] = templateData;", + " var i = 0;", + " while (i < templateData.length) {", + " if (postman.getEnvironmentVariable(\"htpl_name\") == templateData[i].name) {", + " tests[\"Body contains added htpl_name\"] = postman.getEnvironmentVariable(\"htpl_name\") == templateData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == templateData.length)", + " tests[\"host_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"gettemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Applytpl", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"applytpl\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addparent\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delparent\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparent\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getparent", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var parentData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of parents\"] = parentData;", + " var i = 0;", + " while (i < parentData.length) {", + " if (postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name) {", + " tests[\"Body contains added parent\"] = postman.getEnvironmentVariable(\"host_name2\") == parentData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == parentData.length)", + " tests[\"host_name2 was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getparent\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontactgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getcontactgroup\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_alias was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getcontact\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gethostgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = hgData;", + " var i = 0;", + " while (i < hgData.length) {", + " if (postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name) {", + " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == hgData.length)", + " tests[\"hg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"gethostgroup\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setseverity", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Unsetseverity", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"enable\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Disable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"disable\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "32-Hostgroups", + "description": "Tests all commands to manage host groups.", + "item": [ + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};alias;{{hg_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};comment;{{hg_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};activate;{{hg_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};notes;{{hg_notes}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};notes_url;{{hg_notes_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam action_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};action_url;{{hg_action_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};icon_image;{{hg_icon_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam map_icon_image", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};map_icon_image;{{hg_map_icon_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List host groups", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of host categories\"] = hgData;", + " var i = 0;", + " while (i < hgData.length) {", + " if (postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name)", + " {", + " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgData[i].name;", + " tests[\"Body contains added hg_alias\"] = postman.getEnvironmentVariable(\"hg_alias\") == hgData[i].alias;", + " break;", + " }", + " i++;", + " }", + " if (i == hgData.length)", + " tests[\"hg_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"hg\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addmember", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmenber", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmember", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmember", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hg_member_Data = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of host group members\"] = hg_member_Data;", + " var i = 0;", + " while (i < hg_member_Data.length) {", + " if (postman.getEnvironmentVariable(\"host_name\") == hg_member_Data[i].name)", + " {", + " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == hg_member_Data[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == hg_member_Data.length)", + " tests[\"host_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getmember\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "33-Hosts_Categories", + "description": "Tests all commands to manage host categories.", + "item": [ + { + "name": "Addmember", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmember", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmember", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}};{{host_name}}|{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmember", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hc_member_Data = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of host category members\"] = hc_member_Data;", + " var i = 0;", + " while (i < hc_member_Data.length) {", + " if (postman.getEnvironmentVariable(\"host_name\") == hc_member_Data[i].name)", + " {", + " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == hc_member_Data[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == hc_member_Data.length)", + " {", + " tests[\"host_name was found\"] = false;", + " }", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getmember\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Unsetseverity", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List host categories", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hcData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of host categories\"] = hcData;", + " var i = 0;", + " while (i < hcData.length) {", + " if (postman.getEnvironmentVariable(\"hc_name\") == hcData[i].name)", + " {", + " tests[\"Body contains added hc_name\"] = postman.getEnvironmentVariable(\"hc_name\") == hcData[i].name;", + " tests[\"Body contains added hc_alias\"] = postman.getEnvironmentVariable(\"hc_alias\") == hcData[i].alias;", + " break;", + " }", + " i++;", + " }", + " if (i == hcData.length)", + " tests[\"hc_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"hc\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "40-Services_Templates", + "description": "Tests all commands to manage service templates.", + "item": [ + { + "name": "Add service template", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"stpl\",\n \"values\": \"test_stpl;stpl_alias;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam description", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"test_stpl;description;{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};activate;{{stpl_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};alias;{{stpl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create service template-2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description2}};test_alias;{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam template", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};template;{{stpl_description2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam is_volatile", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};is_volatile;{{stpl_is_volatile}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_command_arguments", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_command_arguments;{{command_argument}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam max_check_attempts", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam normal_check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};normal_check_interval;{{stpl_normal_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retry_check_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};retry_check_interval;{{stpl_retry_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam active_checks_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};active_checks_enabled;{{stpl_active_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam passive_checks_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};passive_checks_enabled;{{stpl_passive_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam contact_additive_inheritance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};contact_additive_inheritance;{{stpl_contact_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cg_additive_inheritance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};cg_additive_inheritance;{{stpl_cg_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_interval", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notification_interval;{{stpl_notification_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notification_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notification_options;{{stpl_notif_option}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam first_notification_delay", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};first_notification_delay;{{stpl_first_notif_delay}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam parallelize_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};parallelize_check;{{stpl_parallelize_checks}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam obsess_over_service", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};obsess_over_service;{{stpl_obsess_over_service}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_freshness", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_freshness;{{stpl_check_freshness}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam freshness_threshold", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};freshness_threshold;{{stpl_freshness_threshold}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};event_handler_enabled;{{stpl_event_handler_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam flap_detection_enabled", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};flap_detection_enabled;{{stpl_flap_detection_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam process_perf_data", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};process_perf_data;{{stpl_process_perf_data}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_status_informations", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};retain_status_information;{{stpl_retain_status_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_nonstatus_informations", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};retain_nonstatus_information;{{stpl_retain_nonstatus_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam stalking_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};stalking_options;{{stpl_stalking_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};event_handler;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_arguments", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};event_handler_arguments;{{stpl_event_handler_arg}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notes;{{stpl_notes}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};notes_url;{{stpl_notes_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam action_url", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};action_url;{{stpl_action_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};icon_image;{{stpl_icon_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image_alt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};icon_image_alt;{{stpl_icon_image_alt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam graphtemplate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};graphtemplate;{{stpl_graph_tpl}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};comment;{{stpl_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam service_notif_options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};service_notification_options;{{stpl_notif_options}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List service templates", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var stplData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of service templates\"] = stplData;", + " var i = 0;", + " while (i < stplData.length) {", + " if (postman.getEnvironmentVariable(\"stpl_description\") == stplData[i].description)", + " {", + " tests[\"Body contains added service template\"] = postman.getEnvironmentVariable(\"stpl_description\") == stplData[i].description;", + " tests[\"Body contains added alias\"] = postman.getEnvironmentVariable(\"stpl_alias\") == stplData[i].alias;", + " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == stplData[i]['check command'];", + " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == stplData[i]['check command arg'];", + " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"stpl_normal_check_interval\") == stplData[i]['normal check interval'];", + " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"stpl_retry_check_interval\") == stplData[i]['retry check interval'];", + " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"stpl_max_check\") == stplData[i]['max check attempts'];", + " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"stpl_active_check_enabled\") == stplData[i]['active checks enabled'];", + " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"stpl_passive_check_enabled\") == stplData[i]['passive checks enabled'];", + " break;", + " }", + " i++;", + " }", + " if (i == stplData.length)", + " tests[\"stpl_description was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"stpl\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhosttemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhosttemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethosttemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}|{{htpl_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmacro", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{stpl_macro_name}};{{stpl_macro_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmacro", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var macroData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of macros\"] = macroData;", + " var i = 0;", + " while (i < macroData.length) {", + " if (postman.getEnvironmentVariable(\"stpl_macro_value\") == macroData[i]['macro value']){", + " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"stpl_macro_value\") == macroData[i]['macro value'];", + " break;", + " }", + " i++;", + " }", + " if (i == macroData.length)", + " tests[\"stpl_macro_value was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmacro", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delmacro\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{stpl_macro_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}|{{contact_alias2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name){", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_alias was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontactgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name){", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add trap", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"trap\",\n \"values\": \"test_name;test_OID\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"test_name;name;{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Settrap", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"settrap\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gettrap", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var trapData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of traps\"] = trapData;", + " var i = 0;", + " while (i < trapData.length) {", + " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name){", + " tests[\"Body contains added trap_name\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == trapData.length)", + " tests[\"trap_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"gettrap\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deltrap", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deltrap\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "41-Services", + "description": "Tests all commands to manage services.", + "item": [ + { + "name": "Add service", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};service_test;{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam description", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};service_test;description;{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};activate;{{service_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam template", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};template;{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam is_volatile", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};is_volatile;{{service_is_volatile}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};check_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_command_arguments", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};check_command_arguments;{{command_argument}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam max_check_attempts", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};max_check_attempts;{{service_max_check_attempts}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam normal_check_interval", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};normal_check_interval;{{service_normal_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retry_check_interval", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};retry_check_interval;{{service_retry_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam active_checks_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};active_checks_enabled;{{service_active_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam passive_checks_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};passive_checks_enabled;{{service_passive_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam contact_additive_inheritance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};contact_additive_inheritance;{{service_contact_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cg_additive_inheritance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};cg_additive_inheritance;{{service_cg_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notifications_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notifications_enabled;{{service_notifications_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam contact_additive_inheritance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};contact_additive_inheritance;{{service_contact_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cg_additive_inheritance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};cg_additive_inheritance;{{service_cg_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_interval", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notification_interval;{{service_notif_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notification_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_options", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notification_options;{{service_notif_option}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam first_notification_delay", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};first_notification_delay;{{service_first_notif_delay}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam parallelize_check", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};parallelize_check;{{service_parallelize_checks}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam obsess_over_service", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};obsess_over_service;{{service_obsess_over_service}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_freshness", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};check_freshness;{{service_check_freshness}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam freshness_threshold", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};freshness_threshold;{{service_freshness_threshold}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};event_handler_enabled;{{service_event_handler_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam flap_detection_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};flap_detection_enabled;{{service_flap_detection_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam service_low_flap_threshold", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};service_low_flap_threshold;{{service_low_flap}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam service_high_flap_threshold", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};service_high_flap_threshold;{{service_high_flap}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam process_perf_data", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};process_perf_data;{{service_process_perf_data}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_status_informations", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};retain_status_information;{{service_retain_status_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_nonstatus_informations", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};retain_nonstatus_information;{{service_retain_nonstatus_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};event_handler;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_arguments", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};event_handler_arguments;{{service_event_handler_arg}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notes;{{service_notes}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes_url", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};notes_url;{{service_notes_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam action_url", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};action_url;{{service_action_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};icon_image;{{service_icon_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image_alt", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};icon_image_alt;{{service_icon_image_alt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};comment;{{service_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam service_notif_options", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};service_notification_options;{{service_notif_option}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List service", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of services\"] = serviceData;", + " var i = 0;", + " while (i < serviceData.length) {", + " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i].description)", + " {", + " tests[\"Body contains added service\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i].description;", + " tests[\"Body contains added host name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", + " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == serviceData[i]['check command'];", + " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == serviceData[i]['check command arg'];", + " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"service_normal_check_interval\") == serviceData[i]['normal check interval'];", + " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"service_retry_check_interval\") == serviceData[i]['retry check interval'];", + " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"service_max_check_attempts\") == serviceData[i]['max check attempts'];", + " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"service_active_check_enabled\") == serviceData[i]['active checks enabled'];", + " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"service_passive_check_enabled\") == serviceData[i]['passive checks enabled'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"service_host was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"service\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhost", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhost\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhost", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhost\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethost-2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethost\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethost", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethost\",\n \"object\": \"service\",\n \"values\": \"{{host_name2}};{{service_description}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmacro", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{service_macro_name}};{{service_macro_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmacro", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var macroData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of macros\"] = macroData;", + " var i = 0;", + " while (i < macroData.length) {", + " if (postman.getEnvironmentVariable(\"service_macro_name\") == macroData[i]['macro name'])", + " {", + " tests[\"Body contains added macro_name\"] = postman.getEnvironmentVariable(\"service_macro_name\") == macroData[i]['macro name'];", + " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"service_macro_value\") == macroData[i]['macro value'];", + " break;", + " }", + " i++;", + " }", + " if (i == macroData.length)", + " tests[\"service_macro_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmacro", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delmacro\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{service_macro_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add service categories", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"sc\",\n \"values\": \"sc_test;description_test\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sc\",\n \"values\": \"sc_test;name;{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setseverity", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Unsetseverity", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Resetseverity", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setseverity", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Unsetseverity", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of conctacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", + " {", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_alias was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontactgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of conctact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name){", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addtrap", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addtrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deltrap", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deltrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Settrap", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"settrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gettrap", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var trapData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of traps\"] = trapData;", + " var i = 0;", + " while (i < trapData.length) {", + " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name)", + " {", + " tests[\"Body contains added trap_name\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == trapData.length)", + " tests[\"trap_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"gettrap\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "42-Service_by_Hostgroups", + "description": "Tests all commands to manage services on host group.", + "item": [ + { + "name": "Add hgservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};hgservice_test;{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam description", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};hgservice_test;description;{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};activate;{{hgservice_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam template", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};template;{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam is_volatile", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};is_volatile;{{hgservice_is_volatile}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_command_arguments", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_command_arguments;{{command_argument}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam max_check_attempts", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};max_check_attempts;{{hgservice_max_check_attempts}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam normal_check_interval", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};normal_check_interval;{{hgservice_normal_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retry_check_interval", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retry_check_interval;{{hgservice_retry_check_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam active_checks_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};active_checks_enabled;{{hgservice_active_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam passive_checks_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};passive_checks_enabled;{{hgservice_passive_check_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam contact_additive_inheritance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};contact_additive_inheritance;{{hgservice_contact_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cg_additive_inheritance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};cg_additive_inheritance;{{hgservice_cg_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notifications_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notifications_enabled;{{hgservice_notifications_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_interval", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_interval;{{hgservice_notif_interval}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notification_options", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_options;{{hgservice_notif_option}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam first_notification_delay", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};first_notification_delay;{{hgservice_first_notif_delay}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam parallelize_check", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};parallelize_check;{{hgservice_parallelize_checks}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam obsess_over_service", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};obsess_over_service;{{hgservice_obsess_over_service}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_freshness", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_freshness;{{hgservice_check_freshness}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam freshness_threshold", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};freshness_threshold;{{hgservice_freshness_threshold}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_enabled;{{hgservice_event_handler_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam flap_detection_enabled", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};flap_detection_enabled;{{hgservice_flap_detection_enabled}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam process_perf_data", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};process_perf_data;{{hgservice_process_perf_data}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_status_informations", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_status_information;{{hgservice_retain_status_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam retain_nonstatus_informations", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_nonstatus_information;{{hgservice_retain_nonstatus_info}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam event_handler_arguments", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_arguments;{{hgservice_event_handler_arg}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes;{{hgservice_notes}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notes_url", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes_url;{{hgservice_notes_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam action_url", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};action_url;{{hgservice_action_url}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image;{{hgservice_icon_image}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam icon_image_alt", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image_alt;{{hgservice_icon_image_alt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};comment;{{hgservice_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam service_notif_options", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};service_notification_options;{{hg_notif_option}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List service", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of host group services\"] = serviceData;", + " var i = 0;", + " while (i < serviceData.length) {", + " if (postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description)", + " {", + " tests[\"Body contains added hgservice\"] = postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description;", + " tests[\"Body contains added hgservice_hg\"] = postman.getEnvironmentVariable(\"hg_name\") == serviceData[i]['hg name'];", + " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == serviceData[i]['check command'];", + " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == serviceData[i]['check command arg'];", + " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"hgservice_normal_check_interval\") == serviceData[i]['normal check interval'];", + " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"hgservice_retry_check_interval\") == serviceData[i]['retry check interval'];", + " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"hgservice_max_check_attempts\") == serviceData[i]['max check attempts'];", + " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_active_check_enabled\") == serviceData[i]['active checks enabled'];", + " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_passive_check_enabled\") == serviceData[i]['passive checks enabled'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"hgservice_description was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"hgservice\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create hg-2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name2}};{{hg_name2}};0.0.0.0;;central;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethostgroup-2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name2}};{{hgservice_description}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmacro", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hgservice_macro_name}};{{hgservice_macro_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmacro", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var macroData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of macros\"] = macroData;", + " var i = 0;", + " var macro_name = \"$_SERVICE\" + postman.getEnvironmentVariable(\"hgservice_macro_name\") + \"$\";", + " while (i < macroData.length) {", + " if (macro_name == macroData[i]['macro name'])", + " {", + " tests[\"Body contains added macro_name\"] = macro_name == macroData[i]['macro name'];", + " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"hgservice_macro_value\") == macroData[i]['macro value'];", + " break;", + " }", + " i++;", + " }", + " if (i == macroData.length)", + " tests[\"hgservice_macro_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmacro", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hgservice_macro_name}};{{hgservice_macro_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of conctacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", + " {", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_alias was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setseverity", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Unsetseverity", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontactgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name)", + " {", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "43-Servicegroups", + "description": "Tests all commands to manage service groups.", + "item": [ + { + "name": "Add service group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"sg\",\n \"values\": \"sg_test;alias_test\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"sg_test;name;{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};activate;{{sg_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};alias;{{sg_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};comment;{{sg_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List service group", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var sgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of service groups\"] = sgData;", + " var i = 0;", + " while (i < sgData.length) {", + " if (postman.getEnvironmentVariable(\"sg_name\") == sgData[i].name)", + " {", + " tests[\"Body contains added service group\"] = postman.getEnvironmentVariable(\"sg_name\") == sgData[i].name;", + " tests[\"Body contains added service alias\"] = postman.getEnvironmentVariable(\"sg_alias\") == sgData[i].alias;", + " break;", + " }", + " i++;", + " }", + " if (i == sgData.length)", + " tests[\"sg_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"sg\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getservice", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of services\"] = serviceData;", + " var i = 0;", + " while (i < serviceData.length) {", + " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'])", + " {", + " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", + " tests[\"Body contains added service\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"service_description was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhostgroupservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhostgroupservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethostgroupservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Gethostgroupservice", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hgserviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of host group services\"] = hgserviceData;", + " var i = 0;", + " while (i < hgserviceData.length) {", + " if (postman.getEnvironmentVariable(\"hgservice_description\") == hgserviceData[i]['service description'])", + " {", + " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgserviceData[i]['hostgroup name'];", + " tests[\"Body contains added host hgservice_description\"] = postman.getEnvironmentVariable(\"hgservice_description\") == hgserviceData[i]['service description'];", + " break;", + " }", + " i++;", + " }", + " if (i == hgserviceData.length)", + " tests[\"hg_service_description was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"gethostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "44-Services_Categories", + "description": "Tests all commands to manage service categories.", + "item": [ + { + "name": "Setparam description", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};description;{{sc_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List service category", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var scData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of service categories\"] = scData;", + " var i = 0;", + " while (i < scData.length) {", + " if (postman.getEnvironmentVariable(\"sc_name\") == scData[i].name)", + " {", + " tests[\"Body contains added service category\"] = postman.getEnvironmentVariable(\"sc_name\") == scData[i].name;", + " tests[\"Body contains added description\"] = postman.getEnvironmentVariable(\"sc_description\") == scData[i].description;", + " break;", + " }", + " i++;", + " }", + " if (i == scData.length)", + " tests[\"sc_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"sc\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getservice", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of services\"] = serviceData;", + " var i = 0;", + " while (i < serviceData.length) {", + " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'])", + " {", + " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", + " tests[\"Body contains added service_description\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"service_description was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservicetemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getservicetemplate", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var stplData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of stpl_description\"] = stplData;", + " var i = 0;", + " while (i < stplData.length) {", + " if (postman.getEnvironmentVariable(\"stpl_description\") == hgserviceData[i]['service template description']){", + " tests[\"Body contains added stpl_description\"] = postman.getEnvironmentVariable(\"stpl_description\") == stplData[i]['service template description'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"stpl_description was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delservicetemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setservicetemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "50-Traps_Vendors", + "description": "Tests all commands to manage vendors.", + "item": [ + { + "name": "Add vendor", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;test_alias\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;name;{{vendor_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};alias;{{vendor_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam description", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};description;{{vendor_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List vendors", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var vendorData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of vendors\"] = vendorData;", + " var i = 0;", + " while (i < vendorData.length) {", + " if (postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name) {", + " tests[\"Body contains added vendor\"] = postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name;", + " tests[\"Body contains added vendor_alias\"] = postman.getEnvironmentVariable(\"vendor_alias\") == vendorData[i].alias;", + " break;", + " }", + " i++;", + " }", + " if (i == vendorData.length)", + " tests[\"vendor_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"show\",\n \"object\":\"vendor\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Generatetraps", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"generatetraps\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};{{mib_path}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "51-Traps_SNMP", + "description": "Tests all commands to manage traps.", + "item": [ + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};comments;{{trap_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam output", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};output;{{trap_output}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam oid", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};oid;{{trap_oid}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam status", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};status;{{trap_status}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam vendor", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};vendor;{{trap_vendor}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam matching_mode", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};matching_mode;{{trap_matching_mode}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam reschedule_svc_enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};reschedule_svc_enable;{{trap_reschedule_svc_enable}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam execution_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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam exec_command_enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command_enable;{{trap_exec_command_enable}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam submit_result_enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};submit_result_enable;{{trap_submit_result_enable}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List traps", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var trapData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of matchings\"] = trapData;", + " var i = 0;", + " while (i < trapData.length) {", + " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name) {", + " tests[\"Body contains added trap\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", + " tests[\"Body contains added trap oid\"] = postman.getEnvironmentVariable(\"trap_oid\") == trapData[i].oid;", + " break;", + " }", + " i++;", + " }", + " if (i == trapData.length)", + " tests[\"trap_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"show\",\n \"object\":\"trap\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addmatching", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};test_string;test_reg_exp;ok\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get matching id", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var matchingData = jsonData.result;", + "", + "try {", + " var i = 0;", + " while (i < matchingData.length) {", + " if (\"test_string\" == matchingData[i].string) {", + " postman.setEnvironmentVariable(\"trap_matching_token\",matchingData[i].id);", + " break;", + " }", + " i++;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Updatematching name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};string;{{trap_string}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Updatematching order", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};order;{{trap_matching_order}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Updatematching status", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};status;{{trap_status_string}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Updatematching regexp", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};regexp;{{trap_reg_exp}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmatching", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var matchingData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of matchings\"] = matchingData;", + " var i = 0;", + " while (i < matchingData.length) {", + " if (postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string) {", + " tests[\"Body contains added string\"] = postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string;", + " tests[\"Body contains added regular expression\"] = postman.getEnvironmentVariable(\"trap_reg_exp\") == matchingData[i].regexp;", + " tests[\"Body contains added matching status\"] = postman.getEnvironmentVariable(\"trap_status_string\") == matchingData[i].status;", + " tests[\"Body contains added matching order\"] = postman.getEnvironmentVariable(\"trap_matching_order\") == matchingData[i].order;", + " break;", + " }", + " i++;", + " }", + " if (i == matchingData.length)", + " tests[\"trap_string was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmatching", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "60-Downtimes", + "description": "Tests all commands to manage downtimes.", + "item": [ + { + "name": "Add downtime", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;descritpion_test\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;name;{{downtime_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam description", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};description;{{downtime_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List downtimes", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var downtimeData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of downtimes\"] = downtimeData;", + " var i = 0;", + " while (i < downtimeData.length) {", + " if (postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name){", + " tests[\"Body contains added downtime_name\"] = postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name;", + " tests[\"Body contains added downtime_description\"] = postman.getEnvironmentVariable(\"downtime_description\") == downtimeData[i].description;", + " break;", + " }", + " i++;", + " }", + " if (i == engineData.length)", + " tests[\"enine_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"DOWNTIME\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addweeklyperiod", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addweeklyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{weekly_start_time}};{{weekly_end_time}};{{weekly_fixed}};{{weekly_duration}};{{weekly_day_of_week}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addmonthlyperiod", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addmonthlyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{monthly_start_time}};{{monthly_end_time}};{{monthly_fixed}};{{monthly_duration}};{{monthly_day_of_month}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addspecificperiod", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addspecificperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{specific_start}};{{specific_end}};{{specific_fixed}};{{specific_duration}};{{specific_day_of_week}};{{specific_month_cycle}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List periods", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var downtimeData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of downtimes\"] = downtimeData;", + " var test_start_w = postman.getEnvironmentVariable(\"weekly_start_time\") + ':00';", + " var test_start_m = postman.getEnvironmentVariable(\"monthly_start_time\") + ':00';", + " var test_start_s = postman.getEnvironmentVariable(\"specific_start\") + ':00';", + " for (var i = 0; i < downtimeData.length; i++) {", + " if (test_start_w == downtimeData[i]['start time'])", + " {", + " tests[\"Body contains added weekly_start_time\"] = test_start_w == downtimeData[i]['start time'];", + " var test_end = postman.getEnvironmentVariable(\"weekly_end_time\") + ':00';", + " tests[\"Body contains added weekly_end_time\"] = test_end == downtimeData[i]['end time'];", + " tests[\"Body contains added weekly_fixed\"] = postman.getEnvironmentVariable(\"weekly_fixed\") == downtimeData[i].fixed;", + " if (downtimeData[i].fixed == \"0\")", + " tests[\"Body contains added weekly_duration\"] = postman.getEnvironmentVariable(\"weekly_duration\") == downtimeData[i].duration;", + " tests[\"Body contains added weekly_day_of_week\"] = postman.getEnvironmentVariable(\"weekly_number_days_of_week\") == downtimeData[i]['day of week'];", + " }", + " if (test_start_m == downtimeData[i]['start time'])", + " {", + " tests[\"Body contains added monthly_start_time\"] = test_start_m == downtimeData[1]['start time'];", + " var test_end = postman.getEnvironmentVariable(\"monthly_end_time\") + ':00';", + " tests[\"Body contains added monthly_end_time\"] = test_end == downtimeData[i]['end time'];", + " tests[\"Body contains added monthly_fixed\"] = postman.getEnvironmentVariable(\"monthly_fixed\") == downtimeData[i].fixed;", + " if (downtimeData[i].fixed == \"0\")", + " tests[\"Body contains added monthly_duration\"] = postman.getEnvironmentVariable(\"monthly_duration\") == downtimeData[i].duration;", + " tests[\"Body contains added monthly_day_of_month\"] = postman.getEnvironmentVariable(\"monthly_day_of_month\") == downtimeData[i]['day of month'];", + " }", + " if (test_start_s == downtimeData[i]['start time'])", + " {", + " tests[\"Body contains added specific_start_time\"] = test_start_s == downtimeData[i]['start time'];", + " var test_end = postman.getEnvironmentVariable(\"specific_end\") + ':00';", + " tests[\"Body contains added specific_end_time\"] = test_end == downtimeData[i]['end time'];", + " tests[\"Body contains added specific_fixed\"] = postman.getEnvironmentVariable(\"specific_fixed\") == downtimeData[i].fixed;", + " if (downtimeData[i].fixed == \"0\")", + " tests[\"Body contains added specific_duration\"] = postman.getEnvironmentVariable(\"specific_duration\") == downtimeData[i].duration;", + " tests[\"Body contains added specific_day_of_week\"] = postman.getEnvironmentVariable(\"specific_number_day_of_week\") == downtimeData[i]['day of week'];", + " }", + " }", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listperiods\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhost", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhost", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethost", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delhostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservicegroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delservicegroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setservicegroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Show Service Realtime", + "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\";", + "", + "var jsonData = JSON.parse(responseBody);", + "var result = jsonData.result;", + "", + "var schema = {", + " \"type\": \"array\",", + " \"items\": {", + " \"type\": \"object\",", + " \"properties\": {", + " \"host_name\": {", + " \"type\": \"string\"", + " },", + " \"service_name\": {", + " \"type\": \"string\"", + " },", + " \"author\": {", + " \"type\": \"string\"", + " },", + " \"actual_start_time\": {", + " \"type\": \"string\"", + " },", + " \"end_time\": {", + " \"type\": \"string\"", + " },", + " \"comment_data\": {", + " \"type\": \"string\"", + " },", + " \"duration\": {", + " \"type\": \"string\"", + " },", + " \"fixed\": {", + " \"type\": \"string\"", + " },", + " \"url\": {", + " \"type\": \"string\"", + " }", + " },", + " \"additionalProperties\": false,", + " \"required\": [\"host_name\", \"service_name\", \"author\", \"actual_start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", + " }", + "}", + "", + "tests[\"Validate schema JSON\"] = tv4.validate(result, schema);" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;esx-alger-01|ping\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Show Host Realtime", + "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\";", + "", + "var jsonData = JSON.parse(responseBody);", + "var result = jsonData.result;", + "", + "var schema = {", + " \"type\": \"array\",", + " \"items\": {", + " \"type\": \"object\",", + " \"properties\": {", + " \"host_name\": {", + " \"type\": \"string\"", + " },", + " \"author\": {", + " \"type\": \"string\"", + " },", + " \"actual_start_time\": {", + " \"type\": \"string\"", + " },", + " \"end_time\": {", + " \"type\": \"string\"", + " },", + " \"comment_data\": {", + " \"type\": \"string\"", + " },", + " \"duration\": {", + " \"type\": \"string\"", + " },", + " \"fixed\": {", + " \"type\": \"string\"", + " },", + " \"url\": {", + " \"type\": \"string\"", + " }", + " },", + " \"additionalProperties\": false,", + " \"required\": [\"host_name\", \"author\", \"actual_start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", + " }", + "}", + "", + "tests[\"Validate schema JSON\"] = tv4.validate(result, schema);" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;esx-alger-01\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhost Realtime", + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "postman.setGlobalVariable(\"fixed\", \"1\");", + "", + "var date = new Date();", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + ('0' + date.getHours()).slice(-2) + \":\" + ", + " ('0' + date.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", + "", + "var dateEnd = new Date(date.setHours(date.getHours()+1));", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + ('0' + dateEnd.getHours()).slice(-2) + \":\" + ", + "('0' + dateEnd.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"end_time\", datetime_end);", + "" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;esx-alger-01;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire\"\n}\n" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservice Realtime", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "postman.setGlobalVariable(\"fixed\", \"1\");", + "", + "var date = new Date();", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + ('0' + date.getHours()).slice(-2) + \":\" + ", + " ('0' + date.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", + "", + "var dateEnd = new Date(date.setHours(date.getHours()+1));", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + ('0' + dateEnd.getHours()).slice(-2) + \":\" + ", + "('0' + dateEnd.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"end_time\", datetime_end);", + "" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;esx-alger-01|ping;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addhostgroup Realtime", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "postman.setGlobalVariable(\"fixed\", \"1\");", + "", + "var date = new Date();", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", + " ('0' + date.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", + "", + "var dateEnd = new Date(date.setHours(date.getHours()+1));", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", + "('0' + dateEnd.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"end_time\", datetime_end);" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HG;Databases1;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservicegroup Realtime", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "postman.setGlobalVariable(\"fixed\", \"1\");", + "", + "var date = new Date();", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", + " ('0' + date.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", + "", + "var dateEnd = new Date(date.setHours(date.getHours()+1));", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", + "('0' + dateEnd.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"end_time\", datetime_end);" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SG;Traffic-Europe;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addinstance Realtime", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + }, + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "postman.setGlobalVariable(\"fixed\", \"1\");", + "", + "var date = new Date();", + "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", + " ('0' + date.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", + "", + "var dateEnd = new Date(date.setHours(date.getHours()+1));", + "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", + "('0' + dateEnd.getMinutes()).slice(-2);", + "postman.setEnvironmentVariable(\"end_time\", datetime_end);" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;Central;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "61-Dependencies", + "description": "Tests all commands to manage dependencies.", + "item": [ + { + "name": "Add dependency", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"dep\",\n \"values\": \"dep_test;test_description;{{dep_type}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"dep_test;name;{{dep_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam description", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};description;{{dep_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};comment;{{dep_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam inherits_parent", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};inherits_parent;{{dep_inherits_parent}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam exec_fail_criteria", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};execution_failure_criteria;{{dep_exec_fail_crit}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam notif_fail_criteria", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};notification_failure_criteria;{{dep_notif_fail_crit}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List dependencies", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var depData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of dependencies\"] = depData;", + " var i = 0;", + " while (i < depData.length) {", + " if (postman.getEnvironmentVariable(\"dep_name\") == depData[i].name)", + " {", + " tests[\"Body contains added dep_name\"] = postman.getEnvironmentVariable(\"dep_name\") == depData[i].name;", + " tests[\"Body contains added dep_description\"] = postman.getEnvironmentVariable(\"dep_description\") == depData[i].description;", + " tests[\"Body contains added dep_inherits_parents\"] = postman.getEnvironmentVariable(\"dep_inherits_parent\") == depData[i].inherits_parent;", + " tests[\"Body contains added dep_execution_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_exec_fail_crit\") == depData[i].execution_failure_criteria;", + " tests[\"Body contains added dep_notification_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_notif_fail_crit\") == depData[i].notification_failure_criteria;", + " break;", + " }", + " i++;", + " }", + " if (i == depData.length)", + " tests[\"dep_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"dep\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Create host3", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name3}};{{host_name3}};0.0.0.0;;central;\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addchild", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delparent", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Listdep", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var depData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of dependencies\"] = depData;", + " var i = 0;", + " var nb_find = 0", + " while (i < depData.length) {", + " if (postman.getEnvironmentVariable(\"host_name\") == depData[i].parents)", + " {", + " tests[\"Body contains added a parent\"] = postman.getEnvironmentVariable(\"host_name\") == depData[i].parents;", + " nb_find += 1;", + " }", + " if (postman.getEnvironmentVariable(\"host_name3\") == depData[i].children)", + " {", + " tests[\"Body contains added a child\"] = postman.getEnvironmentVariable(\"host_name3\") == depData[i].children;", + " nb_find += 1;", + " }", + " if (nb_find == 2)", + " break;", + " i++;", + " }", + " if (i == depData.length)", + " tests[\"the child and the parent were found\"] = i < depData.length;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"listdep\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delchild", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "70-ACL_Groups", + "description": "Tests all commands to manage ACL groups.", + "item": [ + { + "name": "Add ACL group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;aclg_alias\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;name;{{aclg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};alias;{{aclg_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};activate;{{aclg_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List ACL groups", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL groups\"] = aclgData;", + " var i = 0;", + " while (i < aclgData.length) {", + " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", + " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", + " tests[\"Body contains added aclg_alias\"] = postman.getEnvironmentVariable(\"aclg_alias\") == aclgData[i].alias;", + " tests[\"Body contains added aclg_activate\"] = postman.getEnvironmentVariable(\"aclg_activate\") == aclgData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == aclgData.length)", + " tests[\"aclg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"aclgroup\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add resource ACL", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;test_alias\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;name;{{racl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addresource", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delresource", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setresource", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getresource", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var raclData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL resources\"] = raclData;", + " var i = 0;", + " while (i < raclData.length) {", + " if (postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name) {", + " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == raclData.length)", + " tests[\"racl_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontact", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", + " tests[\"Body contains added contact\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"aclg_contact_alias was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getcontactgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add ACL Menu", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;test_alias\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;name;{{aclmenu_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addmenu", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delmenu", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setmenu", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getmenu", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclmenuData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL menus\"] = aclmenuData;", + " var i = 0;", + " while (i < aclmenuData.length) {", + " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", + " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == aclmenuData.length)", + " tests[\"menu_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Add ACL action", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;acla_description\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;name;{{acla_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addaction", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delaction", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setaction", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getaction", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclaData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL actions\"] = aclaData;", + " var i = 0;", + " while (i < aclaData.length) {", + " if (postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name) {", + " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == aclaData.length)", + " tests[\"acla_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "71-ACL_Menus", + "description": "Tests all commands to manage ACL menu.", + "item": [ + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};alias;{{aclmenu_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};activate;{{aclmenu_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};comment;{{aclmenu_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List ACL menu", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclmenuData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL Menu\"] = aclmenuData;", + " var i = 0;", + " while (i < aclmenuData.length) {", + " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", + " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", + " tests[\"Body contains added aclmenu_alias\"] = postman.getEnvironmentVariable(\"aclmenu_alias\") == aclmenuData[i].alias;", + " tests[\"Body contains added aclmenu_comment\"] = postman.getEnvironmentVariable(\"aclmenu_comment\") == aclmenuData[i].comment;", + " tests[\"Body contains added aclmenu_activate\"] = postman.getEnvironmentVariable(\"aclmenu_activate\") == aclmenuData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == aclmenuData.length)", + " tests[\"aclmenu_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"aclmenu\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get ACL Groups", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL Menu\"] = aclgData;", + " var i = 0;", + " while (i < aclgData.length) {", + " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", + " tests[\"Body contains ACL menu\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i > aclgData.length)", + " tests[\"aclg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw Home", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke Home", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw Custom Views", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke Custom Views", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw Edit View", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke Edit View", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw Share View", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke Share View", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw Widget Parameters", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke Widget Parameters", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw Add Widget", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke Add Widget", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw rotation", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke rotation", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw delete view", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke delete view", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw add view", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke add view", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw set default", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke set default", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw poller statistics", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke poller statistics", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw broker statistics", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke broker statistics", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw graphs (poller)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke graphs (poller)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw monitoring", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke monitoring", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw status details", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke status details", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services (monitoring)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services (monitoring)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw hosts (monitoring)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke hosts (monitoring)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services grid", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services grid", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services by hostgroup", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services by hostgroup", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services by servicegroup", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services by servicegroup", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw hostgroups summary", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke hostgroups summary", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw performances", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke performances", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw graphs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke graphs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw chart split", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke chart split", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw chart periods", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke chart periods", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw templates (perf)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke templates (perf)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw curves", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke curves", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw metrics", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke metrics", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw event logs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke event logs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw event logs (advanced)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke event logs (advanced)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw system logs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke system logs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw downtimes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke downtimes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw downtimes (main menu)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke downtimes (main menu)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw recurrent downtimes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro recurrent downtimes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke recurrent downtimes", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw comments", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke comments", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw reporting", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke reporting", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw dashboard", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke dashboard", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw hosts (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke hosts (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw host groups (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host groups (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw service groups (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service groups (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant hostsrw (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke hosts (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant hostsrw (config/host)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant hostsro (config/host)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke hosts (config/host)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw host groups (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro host groups (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host groups (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw templates (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro templates (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke templates (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw categories (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro categories (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke categories (config/hosts)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services by host (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro services by host (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services by host (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services by host group (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro services by host group (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services by host group (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw service groups (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro service groups (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service groups (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw templates (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro templates (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke templates (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw categories (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro categories (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke categories (config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw meta services(config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke meta services(config/services)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw users", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke users", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw Contacts / Users", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro Contacts / Users", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke Contacts / Users", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw contact templates", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro contact templates", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke contact templates", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw contact groups", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro contact groups", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke contact groups", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw time periods", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro time periods", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke time periods", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw commands", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke commands", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw discovery", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro discovery", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke discovery", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw miscellaneous", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro miscellaneous", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke miscellaneous", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw connectors", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro connectors", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke connectors", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw escalations", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro escalations", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke escalations", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw hosts (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro hosts (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke hosts (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw host groups (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro host groups (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host groups (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services(dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro services(dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services(dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw service groups(dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro service groups(dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service groups(dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw meta services (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro meta services (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke meta services (dependencies)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw SNMP traps (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke SNMP traps (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw SNMP traps (SNMP)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;snmp traps\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke SNMP traps (SNMP)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;snmp traps\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw manufacturer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;manufacturer\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke manufacturer", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;manufacturer\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw group (SNMP)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;group\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke group (SNMP)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;group\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw mibs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;mibs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke mibs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;mibs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw generate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;generate\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke generate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;generate\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw knowledge base", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke knowledge base", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw hosts (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke hosts (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw host templates (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;host templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host templates (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;host templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw service templates (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;service templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service templates (knowledge)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;service templates\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw pollers (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke pollers (config)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw export configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;export configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke export configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;export configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw pollers (pollers)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro pollers (pollers)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke pollers (pollers)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw engine configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro engine configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke engine configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw broker configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke broker configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw wizard", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizard\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke wizard", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizard\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw wizardajax", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizardajax\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke wizardajax", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizardajax\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw resources", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;resources\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke resources", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;resources\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw administration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke administration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw parameters", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke parameters", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw centreon UI", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centreon UI\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke centreon UI", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centreon UI\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw monitoring (parameters)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;monitoring\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke monitoring (parameters)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;monitoring\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw centcore", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centcore\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke centcore", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centcore\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw my account", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;my account\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke my account", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;my account\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw LDAP", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;LDAP\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke LDAP", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;LDAP\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw RRDtool", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;RRDtool\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke RRDtool", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;RRDtool\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw debug", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;debug\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke debug", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;debug\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw knowledge base (parameters)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;knowledge base\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke knowledge base (parameters)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;knowledge base\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw CSS", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;CSS\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke CSS", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;CSS\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw backup", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;backup\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke backup", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;backup\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;options\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke options", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;options\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw data", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;data\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke data", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;data\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw images", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;images\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke images", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;images\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw extensions", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke extensions", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw modules", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;modules\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke modules", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;modules\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw widgets", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;widgets\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke widgets", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;widgets\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw ACL", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke ACL", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw access groups", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;access groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke access groups", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;access groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw menus access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;menus access\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke menus access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;menus access\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw resources access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;resources access\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke resources access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;resources access\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw actions access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;actions access\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke actions access", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;actions access\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw reload ACL", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;reload ACL\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke reload ACL", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;reload ACL\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw logs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke logs", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw visualisation", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs;visualisation\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke visualisation", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs;visualisation\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw sessions", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;sessions\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke sessions", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;sessions\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw server status", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke server status", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw databases", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status;databases\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke databases", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status;databases\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw about (admin)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke about (admin)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw about (about)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about;about\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke about (about)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about;about\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "72-ACL_Resources", + "description": "Tests all commands to manage Resource ACL.", + "item": [ + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};alias;{{racl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};activate;{{racl_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List resource ACL", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var raclData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL resource\"] = raclData;", + " var i = 0;", + " while (i < raclData.length) {", + " if (postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name) {", + " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name;", + " tests[\"Body contains added racl_alias\"] = postman.getEnvironmentVariable(\"racl_alias\") == raclData[i].alias;", + " tests[\"Body contains added racl_activate\"] = postman.getEnvironmentVariable(\"racl_activate\") == raclData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == raclData.length)", + " tests[\"racl_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"aclresource\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getaclgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL groups\"] = aclgData;", + " var i = 0;", + " while (i < aclgData.length) {", + " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", + " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == aclgData.length)", + " tests[\"aclg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant_host", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant_host\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke_host", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke_host\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant_hostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant_hostgroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke_hostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke_hostgroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant_servicegroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant_servicegroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke_servicegroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke_servicegroup\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "addhostexclusion", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addhostexclusion\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "delhostexclusion", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delhostexclusion\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "addfilter_instance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addfilter_instance\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "delfilter_instance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delfilter_instance\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "addfilter_hostcategory", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addfilter_hostcategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "delfilter_hostcategory", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delfilter_hostcategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "addfilter_servicecategory", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addfilter_servicecategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "delfilter_servicecategory", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delfilter_servicecategory\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}};{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "74-ACL_Actions", + "description": "Tests all commands to manage ACL action.", + "item": [ + { + "name": "Setparam description", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};description;{{acla_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};activate;{{acla_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List ACL actions", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclaData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL actions\"] = aclaData;", + " var i = 0;", + " while (i < aclaData.length) {", + " if (postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name) {", + " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name;", + " tests[\"Body contains added acla_description\"] = postman.getEnvironmentVariable(\"acla_description\") == aclaData[i].description;", + " tests[\"Body contains added acla_activate\"] = postman.getEnvironmentVariable(\"acla_activate\") == aclaData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == aclaData.length)", + " tests[\"acla_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"aclaction\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getaclgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclaData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL actions\"] = aclaData;", + " var i = 0;", + " while (i < aclaData.length) {", + " if (postman.getEnvironmentVariable(\"aclg_name\") == aclaData[i].name) {", + " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclaData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == aclaData.length)", + " tests[\"aclg_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_event_handler", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_event_handler\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_event_handler", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_event_handler\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_flap_detection", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_flap_detection\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_flap_detection", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_flap_detection\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_host_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_host_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_host_obsess", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_obsess\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_host_obsess", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_obsess\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_host_passive_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_passive_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_host_passive_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_host_passive_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_perf_data", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_perf_data\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_perf_data", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_perf_data\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_restart", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_restart\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_restart", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_restart\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_service_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_service_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_service_obsess", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_obsess\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_service_obsess", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_obsess\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_service_passive_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_passive_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_service_passive_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_service_passive_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant global_shutdown", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_shutdown\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke global_shutdown", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};global_shutdown\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_acknowledgement", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_acknowledgement\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_acknowledgement", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_acknowledgement\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_checks_for_services", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks_for_services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_checks_for_services", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_checks_for_services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_comment\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_comment\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_event_handler", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_event_handler\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_event_handler", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_event_handler\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_flap_detection", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_flap_detection\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_flap_detection", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_flap_detection\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_notifications_for_services", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications_for_services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_notigications_for_services", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_notifications_for_services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_schedule_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_schedule_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_schedule_downtime", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_forced_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_schedule_downtime", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_downtime\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_schedule_forced_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_forced_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_schedule_forced_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_schedule_forced_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant host_submit_result", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_submit_result\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host_submit_result", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};host_submit_result\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant poller_listing", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_listing\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke poller_listing", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_listing\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant poller_stats", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_stats\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke poller_stats", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};poller_stats\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_acknowledgement", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_acknowledgement\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_acknowledgement", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_acknowledgement\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_comment\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_comment\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_event_handler", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_event_handler\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_event_handler", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_event_handler\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_flap_detection", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_flap_detection\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_flap_detection", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_flap_detection\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_notifications", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_notifications\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_passive_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_passive_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_passive_checks", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_passive_checks\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_schedule_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_schedule_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_schedule_downtime", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_downtime\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_schedule_downtime", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_downtime\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_schedule_forced_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_forced_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_schedule_forced_check", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_schedule_forced_check\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant service_submit_result", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_submit_result\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke service_submit_result", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};service_submit_result\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant top_counter", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};top_counter\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke top_counter", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}};top_counter\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "75-ACL_Reload", + "description": "Tests all commands to manage ACL.", + "item": [ + { + "name": "Reload", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"reload\",\n \"object\": \"acl\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Lastreload", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"lastreload\",\n \"object\": \"acl\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Lastreload input time", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"lastreload\",\n \"object\": \"acl\",\n \"values\": \"lastreload_time\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "80-Administration_General_Settings", + "description": "Tests all commands to manage settings.", + "item": [ + { + "name": "Setparam broker", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"broker;{{broker_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam broker_correlator_script", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"broker_correlator_script;{{broker_correlator_script}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam centstorage", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"centstorage;{{centstorage_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam debug_auth", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_auth;{{enable_debug_auth}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam debug_ldap_import", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_ldap_import;{{enable_ldap_debug}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam debug_nagios_import", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_nagios_import;{{enable_nagios_debug}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam debug_path", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_path;{{debug_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam debug_rrdtool", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"debug_rrdtool;{{enable_debug_rrdtool}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam enable_autologin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_autologin;{{enable_autologin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam enable_gmt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_gmt;{{enable_gmt}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam enable_logs_sync", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_logs_sync;{{enable_logs_sync}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam enable_perfdata_sync", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"enable_perfdata_sync;{{enable_perfdata_sync}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam gmt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"gmt;{{gmt_value}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam interval_length", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"interval_length;{{interval_length}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam mailer_path_bin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"mailer_path_bin;{{mailer_path_bin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam nagios_path_img", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"nagios_path_img;{{nagios_path_img}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam perl_library_path", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"perl_library_path;{{perl_library_path}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam rrdtool_path_bin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"rrdtool_path_bin;{{rrdtool_path_bin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam snmpttconvertmib_path_bin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"snmpttconvertmib_path_bin;{{snmpttconvertmib_path_bin}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam snmptt_unknowntrap_log_file", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"settings\",\n \"values\": \"snmptt_unknowntrap_log_file;{{snmptt_unknowntrap_log_file}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List settings", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var exceptionData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of exceptions\"] = exceptionData;", + " for (var i = 0; i < exceptionData.length; i++) {", + " switch (exceptionDate[i].parameter)", + " {", + " case \"broker\":", + " tests[\"Body contains the correct setting broker\"] = postman.getEnvironmentVariable(\"broker_value\") == exceptionData[i].value;", + " break;", + " case \"broker_correlator_script\":", + " tests[\"Body contains the correct setting broker_correlator_script\"] = postman.getEnvironmentVariable(\"broker_correlator_script\") == exceptionData[i].value;", + " break;", + " case \"debug_auth\":", + " tests[\"Body contains the correct setting debug_auth\"] = postman.getEnvironmentVariable(\"enable_debug_auth\") == exceptionData[i].value;", + " break;", + " case \"debug_ldap_import\":", + " tests[\"Body contains the correct setting debug_ldap_import\"] = postman.getEnvironmentVariable(\"enable_ldap_debug\") == exceptionData[i].value;", + " break;", + " case \"debug_nagios_import\":", + " tests[\"Body contains the correct setting debug_nagios_ldap\"] = postman.getEnvironmentVariable(\"enable_nagios_debug\") == exceptionData[i].value;", + " break;", + " case \"debug_path\":", + " tests[\"Body contains the correct setting debug_path\"] = postman.getEnvironmentVariable(\"debug_path\") == exceptionData[i].value;", + " break;", + " case \"debug_rrdtool\":", + " tests[\"Body contains the correct setting debug_rrdtool\"] = postman.getEnvironmentVariable(\"enable_debug_rrdtool\") == exceptionData[i].value;", + " break;", + " case \"enable_autologin\":", + " tests[\"Body contains the correct setting enable_authologin\"] = postman.getEnvironmentVariable(\"enable_autologin\") == exceptionData[i].value;", + " break;", + " case \"enable_logs_sync\":", + " tests[\"Body contains the correct setting enable_logs_sync\"] = postman.getEnvironmentVariable(\"enable_logs_sync\") == exceptionData[i].value;", + " break;", + " case \"enable_perfdata_sync\":", + " tests[\"Body contains the correct setting enable_logs_sync\"] = postman.getEnvironmentVariable(\"enable_logs_sync\") == exceptionData[i].value;", + " break;", + " case \"enable_perfdata_sync\":", + " tests[\"Body contains the correct setting enable_perfdata_sync\"] = postman.getEnvironmentVariable(\"enable_perfdata_sync\") == exceptionData[i].value;", + " break;", + " case \"gmt\":", + " tests[\"Body contains the correct setting gmt\"] = postman.getEnvironmentVariable(\"gmt_value\") == exceptionData[i].value;", + " break;", + " case \"interval_length\":", + " tests[\"Body contains the correct setting interval_length\"] = postman.getEnvironmentVariable(\"interval_length\") == exceptionData[i].value;", + " break;", + " case \"mailer_path_bin\":", + " tests[\"Body contains the correct setting mailer_path_bin\"] = postman.getEnvironmentVariable(\"mailer_path_bin\") == exceptionData[i].value;", + " break;", + " case \"nagios_path_img\":", + " tests[\"Body contains the correct setting nagios_path_img\"] = postman.getEnvironmentVariable(\"nagios_path_img\") == exceptionData[i].value;", + " break;", + " case \"perl_library_path\":", + " tests[\"Body contains the correct setting perl_library_path\"] = postman.getEnvironmentVariable(\"perl_library_path\") == exceptionData[i].value;", + " break;", + " case \"rrdtool_path_bin\":", + " tests[\"Body contains the correct setting rrdtool_path_bin\"] = postman.getEnvironmentVariable(\"rrdtool_path_bin\") == exceptionData[i].value;", + " break;", + " case \"snmpttconvertmib_path_bin\":", + " tests[\"Body contains the correct setting snmpttconvertmib_path_bin\"] = postman.getEnvironmentVariable(\"snmpttconvertmib_path_bin\") == exceptionData[i].value;", + " break;", + " case \"snmptt_unknowntrap_log_file\":", + " tests[\"Body contains the correct setting snmptt_unknowntrap_log_file\"] = postman.getEnvironmentVariable(\"snmptt_unknowntrap_log_file\") == exceptionData[i].value;", + " break;", + " }", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"show\",\n \"object\":\"settings\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "81-Administration_LDAP_Settings", + "description": "Tests all commands to manage LDAP.", + "item": [ + { + "name": "Add LDAP", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"ldap\",\n \"values\": \"test_ldap;test_description\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"test_ldap;name;{{ldap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam description", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};description;{{ldap_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};enable;{{ldap_enable}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};alias;{{ldap_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam bind_dn", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};bind_dn;{{ldap_bind_dn}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam bind_pass", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};bind_pass;{{ldap_bind_pass}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam group_base_search", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_base_search;{{ldap_group_base_search}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam group_filter", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_filter;{{ldap_group_filter}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam group_member", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_member;{{ldap_group_member}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam group_name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};group_name;{{ldap_group_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_auto_import", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_auto_import;{{ldap_auto_import}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_contact_tmpl", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_contact_tmpl;{{ctpl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_dns_use_domain", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_dns_use_domain;{{ldap_dns_use_domain}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_search_limit", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_search_limit;{{ldap_search_limit}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_search_timeout", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_search_timeout;{{ldap_search_timeout}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_srv_dns", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_srv_dns;{{ldap_srv_dns}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_store_password", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_store_password;{{ldap_store_pwd}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam ldap_template", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};ldap_template;{{ldap_tpl}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam protocol_version", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};protocol_version;{{ldap_protocol_version}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_base_search", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_base_search;{{ldap_user_base_search}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_email", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_email;{{ldap_user_email}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_filter", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_filter;{{ldap_user_filter}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_firstname", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_firstname;{{ldap_user_firstname}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_lastname", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_lastname;{{ldap_user_lastname}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_name;{{ldap_user_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_pager", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_pager;{{ldap_user_pager}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam user_group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};user_group;{{ldap_user_group}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List LDAP", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var ldapData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ldap configurations\"] = ldapData;", + " var i = 0;", + " while (i < ldapData.length) {", + " if (postman.getEnvironmentVariable(\"ldap_name\") == ldapData[i].name) {", + " tests[\"Body contains added ldap_name\"] = postman.getEnvironmentVariable(\"ldap_name\") == ldapData[i].name;", + " tests[\"Body contains added ldap_description\"] = postman.getEnvironmentVariable(\"ldap_description\") == ldapData[i].description;", + " tests[\"Body contains added ldap_enable\"] = postman.getEnvironmentVariable(\"ldap_enable\") == ldapData[i].status;", + " break;", + " }", + " i++;", + " }", + " if (i == ldapData.length)", + " tests[\"ldap_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"ldap\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addserver", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}};{{ldap_server_address}};{{ldap_server_port}};{{ldap_use_ssl}};{{ldap_use_tls}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get server id", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serverData = jsonData.result;", + "", + "try {", + " var i = 0;", + " while (i < serverData.length) {", + " if (postman.getEnvironmentVariable(\"ldap_server_address\") == serverData[i].address) {", + " postman.setEnvironmentVariable(\"ldap_server_id\",serverData[i].id);", + " break;", + " }", + " i++;", + " }", + " if (i == serverData.length)", + " tests[\"ldap_server_adress was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"showserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparamserver host_address", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};host_address;{{ldap_host_address}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparamserver host_port", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};host_port;{{ldap_host_port}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparamserver host_order", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};host_order;{{ldap_host_order}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparamserver use_ssl", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};use_ssl;{{ldap_use_ssl_changed}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparamserver use_tls", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparamserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}};use_tls;{{ldap_use_tls_changed}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Showserver", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serverData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of servers\"] = serverData;", + " var i = 0;", + " while (i < serverData.length) {", + " if (postman.getEnvironmentVariable(\"ldap_host_address\") == serverData[i].address) {", + " tests[\"Body contains added server\"] = postman.getEnvironmentVariable(\"ldap_host_address\") == serverData[i].address;", + " tests[\"Body contains added server_port\"] = postman.getEnvironmentVariable(\"ldap_host_port\") == serverData[i].port;", + " tests[\"Body contains added server_use_ssl\"] = postman.getEnvironmentVariable(\"ldap_use_ssl_changed\") == serverData[i].ssl;", + " tests[\"Body contains added server_use_tls\"] = postman.getEnvironmentVariable(\"ldap_use_tls_changed\") == serverData[i].tls;", + " tests[\"Body contains added server_use_tls\"] = postman.getEnvironmentVariable(\"ldap_host_order\") == serverData[i].order;", + " break;", + " }", + " i++;", + " }", + " if (i == serverData.length)", + " tests[\"ldap_server_address was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"showserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delserver", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delserver\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_server_id}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "90-Engine_CFG", + "description": "Tests all commands to manage ACL.", + "item": [ + { + "name": "Add engine_CFG", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_nagios_config}};{{instance_name}};{{engine_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_nagios_config}};nagios_name;{{engine_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam instance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};instance;{{instance_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam broker_module", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};broker_module;{{instance_broker_module}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam activate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};nagios_activate;{{instance_activate}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List engine_CFG", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var engineData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of downtimes\"] = engineData;", + " var i = 0;", + " while (i < engineData.length) {", + " if (postman.getEnvironmentVariable(\"engine_name\") == engineData[i]['nagios name']){", + " tests[\"Body contains added engine_name\"] = postman.getEnvironmentVariable(\"engine_name\") == engineData[i]['nagios name'];", + " tests[\"Body contains added instance_name2\"] = postman.getEnvironmentVariable(\"instance_name2\") == engineData[i].instance;", + " tests[\"Body contains added engine_comment\"] = postman.getEnvironmentVariable(\"engine_comment\") == engineData[i]['nagios comment'];", + " break;", + " }", + " i++;", + " }", + " if (i == engineData.length)", + " tests[\"engine_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"enginecfg\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addbrokermodule", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addbrokermodule\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}};{{instance_broker_module2}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "99-Delete", + "description": "", + "item": [ + { + "name": "Del ACL action", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"aclaction\",\n \"values\": \"{{acla_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del ACL group", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del ACL Menu", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del resource ACL", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"aclresource\",\n \"values\": \"{{racl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del 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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del contact group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del ctpl", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del ctpl2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"contacttpl\",\n \"values\": \"{{ctpl_alias2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del contact", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del contact2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del dependencies", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del downtime", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del engine_CFG", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"enginecfg\",\n \"values\": \"{{engine_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del host category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"hc\",\n \"values\": \"{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del hgservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del host group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del host group2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del resource CFG", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"resourcecfg\",\n \"values\": \"{{resourcecfg_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del Instance", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del Instance2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"instance\",\n \"values\": \"{{instance_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del service", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del host3", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"host\",\n \"values\": \"{{host_name3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del htpl2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del htpl3", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name3}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del LDAP", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"ldap\",\n \"values\": \"{{ldap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del service group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del service template", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del service template2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description2}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del service category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del host", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del htpl", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del tp", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del trap", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del vendor", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delinput ipv4", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv4_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delinput ipv6", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_ipv6_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delinput file", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delinput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{input_file_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Dellogger file", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_file_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Dellogger standard", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_standard_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Dellogger syslog", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_syslog_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Dellogger monitoring", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"dellogger\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{logger_monitoring_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deloutput ipv4", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv4_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deloutput ipv6", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_ipv6_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deloutput file", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_file_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deloutput rrd", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_rrd_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deloutput storage", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_storage_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Deloutput sql", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"deloutput\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}};{{output_sql_id}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del broker", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"centbrokercfg\",\n \"values\": \"{{broker_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Del host2", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"del\",\n \"object\": \"host\",\n \"values\": \"{{host_name2}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + } + ] } \ No newline at end of file From e8cf47d3198c4d349372112b6ee336fd6a5ec2fe Mon Sep 17 00:00:00 2001 From: Guillaume28 Date: Wed, 27 Sep 2017 17:31:18 +0200 Subject: [PATCH 14/16] test(clapi): add new Rt test API --- .../realtime_rest_api.postman_collection.json | 7463 +++++++++++++++++ .../rest_api/rest_api.postman_collection.json | 7390 +++++----------- .../rest_api.postman_environment.json | 74 +- .../rest_api_realtime.postman_collection.json | 3999 +++++++++ .../centreonRtDowntime.class.php | 2 + 5 files changed, 13778 insertions(+), 5150 deletions(-) create mode 100644 tests/rest_api/realtime_rest_api.postman_collection.json create mode 100644 tests/rest_api/rest_api_realtime.postman_collection.json diff --git a/tests/rest_api/realtime_rest_api.postman_collection.json b/tests/rest_api/realtime_rest_api.postman_collection.json new file mode 100644 index 00000000000..5a89d090ea4 --- /dev/null +++ b/tests/rest_api/realtime_rest_api.postman_collection.json @@ -0,0 +1,7463 @@ +{ + "variables": [], + "info": { + "name": "Centreon Web Rest API realtime", + "_postman_id": "fbbb7aff-7700-5886-8793-217eed438d0b", + "description": "", + "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" + }, + "item": [ + { + "name": "00-Authenticate", + "description": "", + "item": [ + { + "name": "Authenticate", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "postman.setEnvironmentVariable(\"token\",jsonData.authToken);" + ] + } + } + ], + "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": "" + } + ], + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "key": "username", + "value": "{{api_user}}", + "description": "", + "type": "text" + }, + { + "key": "password", + "value": "{{api_password}}", + "description": "", + "type": "text" + } + ] + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "01-Base configuration", + "description": "", + "item": [ + { + "name": "10-Timeperiods", + "description": "", + "item": [ + { + "name": "Add tp", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"tp\",\n \"values\": \"{{tp_name}};{{tp_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam sunday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam monday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam tuesday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam wednesday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam thursday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam friday", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "11-Commands", + "description": "Tests all commands to manage commands.", + "item": [ + { + "name": "Add 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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"cmd\",\n \"values\": \"{{command_name}};{{command_type}};{{command_line}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "21-Contacts", + "description": "Tests all commands to manage contact.", + "item": [ + { + "name": "Add contact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "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": [] + }, + { + "name": "Setparam hostnotifcmd", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifcmd;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam svcnotifcmd", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifcmd;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam hostnotifperiod", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};hostnotifperiod;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam svcnotifperiod", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};svcnotifperiod;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam hostnotifopt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam svcnotifopt", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "22-Contactgroups", + "description": "Tests all commands to manage contact groups.", + "item": [ + { + "name": "Add contact group", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{cg_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"cg\",\n \"values\": \"{{cg_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "23-Hostgroups", + "description": "Tests all commands to manage host groups.", + "item": [ + { + "name": "Add hostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name}};{{hg_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "24-Hosts_Categories", + "description": "Tests all commands to manage host categories.", + "item": [ + { + "name": "Add host category", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Set hc 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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "25-Services_Categories", + "description": "Tests all commands to manage service categories.", + "item": [ + { + "name": "Add service category", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{sc_severity_level}};{{sc_severity_image}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "26-Servicegroups", + "description": "Tests all commands to manage service groups.", + "item": [ + { + "name": "Add service group", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{sg_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "30-Hosts_Templates", + "description": "", + "item": [ + { + "name": "Create host template", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{htpl_name}};{{host_address}};;central;\"\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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"htpl\",\n \"values\": \"{{htpl_name}};check_period;{{tp_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam max_check_attempts", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam snmp_community", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Setparam snmp_version", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setseverity", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"htpl\",\n \"values\": \"{{htpl_name}};{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "31-Hosts", + "description": "Tests all commands to manage hosts", + "item": [ + { + "name": "Add host", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{host_alias}};{{host_address}};{{htpl_name}};Central;\"\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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"setparam\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};check_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addtemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"addtemplate\",\n \"object\":\"host\",\n \"values\": \"{{host_name}};{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Applytpl", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"applytpl\",\n \"object\":\"host\",\n \"values\": \"{{host_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Sethostgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setseverity", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"host\",\n \"values\": \"{{host_name}};{{hc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "40-Services_Templates", + "description": "Tests all commands to manage service templates.", + "item": [ + { + "name": "Add service template", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{stpl_alias}};\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam check_period", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};check_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam max_check_attempts", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "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": [] + }, + { + "name": "Sethosttemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"sethosttemplate\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{htpl_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "41-Services", + "description": "Tests all commands to manage services.", + "item": [ + { + "name": "Add service", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam template", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};template;{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setseverity", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontact", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{contact_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setcontactgroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};{{cg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Set servicegroup", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "99-Generate", + "description": "", + "item": [ + { + "name": "Generate configuration", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"APPLYCFG\",\n \"values\": \"Central\"\n}" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + } + ] + }, + { + "name": "10-Host", + "description": "", + "item": [ + { + "name": "host list with no parameters", + "description": "", + "item": [ + { + "name": "host list", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "Host list with limit parameter", + "description": "", + "item": [ + { + "name": "Limit", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field id", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=id,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "id,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field name", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit=2&fields=name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "2", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field alias", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=alias,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "alias,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field address", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=address,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "address,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field state", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=state,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "state,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field state_type", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=state_type,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "state_type,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field output", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=output,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "output,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field max_check_attempts", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=max_check_attempts,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "max_check_attempts,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field check_attempt", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=check_attempt,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "check_attempt,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field last_check", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=last_check,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "last_check,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field last_state_change", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=last_state_change,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "last_state_change,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field last_hard_state_change", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=last_hard_state_change,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "last_hard_state_change,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field acknowledged", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=acknowledged,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "acknowledged,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field instance", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=instance,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "instance,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field criticality", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&criticality=", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "criticality", + "value": "", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "Host list with viewType parameter", + "description": "", + "item": [ + { + "name": "list with viewType", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "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, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "all,unhandled,problems", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "with viewType all", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&viewType=all", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "all", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "with viewType unhandled", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&viewType=unhandled", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "unhandled", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "with viewType problems", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&viewType=problems", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "problems", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "viewType with limit", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=all,unhandled,problems", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "all,unhandled,problems", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "viewType all with limit", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=all", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "all", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "viewType unhandled with limit", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=unhandled", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "unhandled", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "viewType problems with limit", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=problems", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "problems", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "Host list with status filter", + "description": "", + "item": [ + { + "name": "status up with state and name", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=up&fields=name, state", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "up", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "name, state", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "status down with state and name", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=down&fields=name, state", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "down", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "name, state", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "status unreachable with state and name", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=unreachable&fields=name, state", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "unreachable", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "name, state", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "status pending with state and name", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=pending&fields=name, state", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "pending", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "name, state", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "status all with limit", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&status=all&fields=name, state", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "all", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "name, state", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "Host list by Host", + "description": "", + "item": [ + { + "name": "search by host name", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with status up", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=up", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "up", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with status down", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=down", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "down", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with status pending", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=pending", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "pending", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with status unreachable", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=unreachable", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "unreachable", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with id field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=id", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "id", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with name field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with alias field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=alias", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "alias", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with address field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=address", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "address", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with state field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=state", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "state", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with state_type field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=state_type", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "state_type", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with output field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=output", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "output", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with max_check_attempts field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=max_check_attempts", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "max_check_attempts", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with last_check field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=last_check", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "last_check", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with last_state_change field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=last_state_change", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "last_state_change", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with last_hard_state_change field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=last_hard_state_change", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "last_hard_state_change", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with acknowledged field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=acknowledged", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "acknowledged", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with instance field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=instance", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "instance", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with criticality field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=criticality", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "criticality", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with passive_checks field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=passive_checks", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "passive_checks", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + } + ] + }, + { + "name": "20-Service", + "description": "", + "item": [ + { + "name": "Service List", + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_services", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Service List by host name", + "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, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_services", + "equals": true, + "description": "" + }, + { + "key": "searchHost", + "value": "{{host_name}}", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Service List by host name and service name", + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&searchHost={{host_name}}&search={{service_description}}", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_services", + "equals": true, + "description": "" + }, + { + "key": "searchHost", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{service_description}}", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + } + ] + } + ] +} \ No newline at end of file diff --git a/tests/rest_api/rest_api.postman_collection.json b/tests/rest_api/rest_api.postman_collection.json index 9e49badae99..8cdb113c48e 100644 --- a/tests/rest_api/rest_api.postman_collection.json +++ b/tests/rest_api/rest_api.postman_collection.json @@ -1,8 +1,8 @@ { "variables": [], "info": { - "name": "Centreon Web Rest API copy", - "_postman_id": "e687a42e-6678-d1f4-1fcf-14cd2867c15c", + "name": "Centreon Web Rest API", + "_postman_id": "7e8d87c5-e220-ec4f-01f9-a531a68da178", "description": "", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" }, @@ -19055,64 +19055,6 @@ }, "response": [] }, - { - "name": "Set contact non admin", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;0\"\n}" - }, - "description": "" - }, - "response": [] - }, { "name": "Create contact-2", "event": [ @@ -19176,13 +19118,34 @@ "response": [] }, { - "name": "Set contact non admin", + "name": "List contact copy", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_name\") == contactData[i].name) {", + " tests[\"Body contains added contact_name\"] = postman.getEnvironmentVariable(\"contact_name\") == contactData[i].name;", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].alias;", + " tests[\"Body contains added contact_email\"] = postman.getEnvironmentVariable(\"contact_mail\") == contactData[i].email;", + " tests[\"Body contains added contact_GUI_access\"] = postman.getEnvironmentVariable(\"contact_GUI_access\") == contactData[i]['gui access'];", + " tests[\"Body contains added contact_admin\"] = postman.getEnvironmentVariable(\"contact_admin\") == contactData[i].admin;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_name was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -19231,7 +19194,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;0\"\n}" + "raw": "{\n \"action\": \"show\",\n \"object\": \"contact\"\n}" }, "description": "" }, @@ -33918,7 +33881,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_name}}\"\n}" }, "description": "" }, @@ -33980,7 +33943,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_name}}\"\n}" }, "description": "" }, @@ -34042,7 +34005,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}|{{contact_alias2}}\"\n}" + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_name}}|{{contact_name2}}\"\n}" }, "description": "" }, @@ -35464,130 +35427,6 @@ }, "response": [] }, - { - "name": "Setparam contact_additive_inheritance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};contact_additive_inheritance;{{service_contact_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam cg_additive_inheritance", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};cg_additive_inheritance;{{service_cg_additive_inheritance}}\"\n}" - }, - "description": "" - }, - "response": [] - }, { "name": "Setparam notifications_enabled", "event": [ @@ -39770,7 +39609,7 @@ "response": [] }, { - "name": "Setparam contact_additive_inheritance", + "name": "Setparam notifications_enabled", "event": [ { "listen": "test", @@ -39825,14 +39664,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};contact_additive_inheritance;{{hgservice_contact_additive_inheritance}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notifications_enabled;{{hgservice_notifications_enabled}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam cg_additive_inheritance", + "name": "Setparam notification_interval", "event": [ { "listen": "test", @@ -39887,14 +39726,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};cg_additive_inheritance;{{hgservice_cg_additive_inheritance}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_interval;{{hgservice_notif_interval}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam notifications_enabled", + "name": "Setparam notification_period", "event": [ { "listen": "test", @@ -39949,14 +39788,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notifications_enabled;{{hgservice_notifications_enabled}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_period;{{tp_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam notification_interval", + "name": "Setparam notification_options", "event": [ { "listen": "test", @@ -40011,14 +39850,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_interval;{{hgservice_notif_interval}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_options;{{hgservice_notif_option}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam notification_period", + "name": "Setparam first_notification_delay", "event": [ { "listen": "test", @@ -40073,14 +39912,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_period;{{tp_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};first_notification_delay;{{hgservice_first_notif_delay}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam notification_options", + "name": "Setparam parallelize_check", "event": [ { "listen": "test", @@ -40135,14 +39974,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_options;{{hgservice_notif_option}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};parallelize_check;{{hgservice_parallelize_checks}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam first_notification_delay", + "name": "Setparam obsess_over_service", "event": [ { "listen": "test", @@ -40197,14 +40036,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};first_notification_delay;{{hgservice_first_notif_delay}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};obsess_over_service;{{hgservice_obsess_over_service}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam parallelize_check", + "name": "Setparam check_freshness", "event": [ { "listen": "test", @@ -40259,14 +40098,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};parallelize_check;{{hgservice_parallelize_checks}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_freshness;{{hgservice_check_freshness}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam obsess_over_service", + "name": "Setparam freshness_threshold", "event": [ { "listen": "test", @@ -40321,14 +40160,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};obsess_over_service;{{hgservice_obsess_over_service}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};freshness_threshold;{{hgservice_freshness_threshold}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam check_freshness", + "name": "Setparam event_handler_enabled", "event": [ { "listen": "test", @@ -40383,14 +40222,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_freshness;{{hgservice_check_freshness}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_enabled;{{hgservice_event_handler_enabled}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam freshness_threshold", + "name": "Setparam flap_detection_enabled", "event": [ { "listen": "test", @@ -40445,14 +40284,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};freshness_threshold;{{hgservice_freshness_threshold}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};flap_detection_enabled;{{hgservice_flap_detection_enabled}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam event_handler_enabled", + "name": "Setparam process_perf_data", "event": [ { "listen": "test", @@ -40507,14 +40346,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_enabled;{{hgservice_event_handler_enabled}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};process_perf_data;{{hgservice_process_perf_data}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam flap_detection_enabled", + "name": "Setparam retain_status_informations", "event": [ { "listen": "test", @@ -40569,14 +40408,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};flap_detection_enabled;{{hgservice_flap_detection_enabled}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_status_information;{{hgservice_retain_status_info}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam process_perf_data", + "name": "Setparam retain_nonstatus_informations", "event": [ { "listen": "test", @@ -40631,14 +40470,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};process_perf_data;{{hgservice_process_perf_data}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_nonstatus_information;{{hgservice_retain_nonstatus_info}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam retain_status_informations", + "name": "Setparam event_handler", "event": [ { "listen": "test", @@ -40693,14 +40532,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_status_information;{{hgservice_retain_status_info}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler;{{command_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam retain_nonstatus_informations", + "name": "Setparam event_handler_arguments", "event": [ { "listen": "test", @@ -40755,14 +40594,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_nonstatus_information;{{hgservice_retain_nonstatus_info}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_arguments;{{hgservice_event_handler_arg}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam event_handler", + "name": "Setparam notes", "event": [ { "listen": "test", @@ -40817,14 +40656,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler;{{command_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes;{{hgservice_notes}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam event_handler_arguments", + "name": "Setparam notes_url", "event": [ { "listen": "test", @@ -40879,14 +40718,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_arguments;{{hgservice_event_handler_arg}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes_url;{{hgservice_notes_url}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam notes", + "name": "Setparam action_url", "event": [ { "listen": "test", @@ -40941,14 +40780,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes;{{hgservice_notes}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};action_url;{{hgservice_action_url}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam notes_url", + "name": "Setparam icon_image", "event": [ { "listen": "test", @@ -41003,14 +40842,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes_url;{{hgservice_notes_url}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image;{{hgservice_icon_image}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam action_url", + "name": "Setparam icon_image_alt", "event": [ { "listen": "test", @@ -41065,14 +40904,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};action_url;{{hgservice_action_url}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image_alt;{{hgservice_icon_image_alt}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam icon_image", + "name": "Setparam comment", "event": [ { "listen": "test", @@ -41127,14 +40966,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image;{{hgservice_icon_image}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};comment;{{hgservice_comment}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam icon_image_alt", + "name": "Setparam service_notif_options", "event": [ { "listen": "test", @@ -41189,20 +41028,47 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image_alt;{{hgservice_icon_image_alt}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};service_notification_options;{{hg_notif_option}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam comment", + "name": "List service", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of host group services\"] = serviceData;", + " var i = 0;", + " while (i < serviceData.length) {", + " if (postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description)", + " {", + " tests[\"Body contains added hgservice\"] = postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description;", + " tests[\"Body contains added hgservice_hg\"] = postman.getEnvironmentVariable(\"hg_name\") == serviceData[i]['hg name'];", + " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == serviceData[i]['check command'];", + " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == serviceData[i]['check command arg'];", + " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"hgservice_normal_check_interval\") == serviceData[i]['normal check interval'];", + " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"hgservice_retry_check_interval\") == serviceData[i]['retry check interval'];", + " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"hgservice_max_check_attempts\") == serviceData[i]['max check attempts'];", + " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_active_check_enabled\") == serviceData[i]['active checks enabled'];", + " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_passive_check_enabled\") == serviceData[i]['passive checks enabled'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"hgservice_description was found\"] = false;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -41251,14 +41117,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};comment;{{hgservice_comment}}\"\n}" + "raw": "{\n \"action\": \"show\",\n \"object\": \"hgservice\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam service_notif_options", + "name": "Create hg-2", "event": [ { "listen": "test", @@ -41313,47 +41179,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};service_notification_options;{{hg_notif_option}}\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name2}};{{hg_name2}};0.0.0.0;;central;\"\n}" }, "description": "" }, "response": [] }, { - "name": "List service", + "name": "Addhostgroup", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serviceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of host group services\"] = serviceData;", - " var i = 0;", - " while (i < serviceData.length) {", - " if (postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description)", - " {", - " tests[\"Body contains added hgservice\"] = postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description;", - " tests[\"Body contains added hgservice_hg\"] = postman.getEnvironmentVariable(\"hg_name\") == serviceData[i]['hg name'];", - " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == serviceData[i]['check command'];", - " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == serviceData[i]['check command arg'];", - " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"hgservice_normal_check_interval\") == serviceData[i]['normal check interval'];", - " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"hgservice_retry_check_interval\") == serviceData[i]['retry check interval'];", - " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"hgservice_max_check_attempts\") == serviceData[i]['max check attempts'];", - " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_active_check_enabled\") == serviceData[i]['active checks enabled'];", - " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_passive_check_enabled\") == serviceData[i]['passive checks enabled'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"hgservice_description was found\"] = false;", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -41402,14 +41241,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"hgservice\"\n}" + "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Create hg-2", + "name": "Delhostgroup", "event": [ { "listen": "test", @@ -41464,14 +41303,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name2}};{{hg_name2}};0.0.0.0;;central;\"\n}" + "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addhostgroup", + "name": "Sethostgroup-2", "event": [ { "listen": "test", @@ -41526,14 +41365,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delhostgroup", + "name": "Sethostgroup", "event": [ { "listen": "test", @@ -41588,14 +41427,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name2}};{{hgservice_description}};{{hg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Sethostgroup-2", + "name": "Setmacro", "event": [ { "listen": "test", @@ -41650,20 +41489,41 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" + "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hgservice_macro_name}};{{hgservice_macro_value}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Sethostgroup", + "name": "Getmacro", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var macroData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of macros\"] = macroData;", + " var i = 0;", + " var macro_name = \"$_SERVICE\" + postman.getEnvironmentVariable(\"hgservice_macro_name\") + \"$\";", + " while (i < macroData.length) {", + " if (macro_name == macroData[i]['macro name'])", + " {", + " tests[\"Body contains added macro_name\"] = macro_name == macroData[i]['macro name'];", + " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"hgservice_macro_value\") == macroData[i]['macro value'];", + " break;", + " }", + " i++;", + " }", + " if (i == macroData.length)", + " tests[\"hgservice_macro_name was found\"] = false;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -41712,14 +41572,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name2}};{{hgservice_description}};{{hg_name}}\"\n}" + "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setmacro", + "name": "Addcontact", "event": [ { "listen": "test", @@ -41774,41 +41634,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hgservice_macro_name}};{{hgservice_macro_value}}\"\n}" + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getmacro", + "name": "Delcontact", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var macroData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of macros\"] = macroData;", - " var i = 0;", - " var macro_name = \"$_SERVICE\" + postman.getEnvironmentVariable(\"hgservice_macro_name\") + \"$\";", - " while (i < macroData.length) {", - " if (macro_name == macroData[i]['macro name'])", - " {", - " tests[\"Body contains added macro_name\"] = macro_name == macroData[i]['macro name'];", - " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"hgservice_macro_value\") == macroData[i]['macro value'];", - " break;", - " }", - " i++;", - " }", - " if (i == macroData.length)", - " tests[\"hgservice_macro_name was found\"] = false;", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -41857,14 +41696,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delmacro", + "name": "Setcontact", "event": [ { "listen": "test", @@ -41919,20 +41758,39 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hgservice_macro_name}};{{hgservice_macro_value}}\"\n}" + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addcontact", + "name": "Getcontact", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of conctacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", + " {", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_alias was found\"] = false;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -41981,14 +41839,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" + "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delcontact", + "name": "Addcontactgroup", "event": [ { "listen": "test", @@ -42043,14 +41901,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" + "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setcontact", + "name": "Delcontactgroup", "event": [ { "listen": "test", @@ -42105,39 +41963,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getcontact", + "name": "Setcontactgroup", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of conctacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", - " {", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_alias was found\"] = false;", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -42186,20 +42025,39 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setseverity", + "name": "Getcontactgroup", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name)", + " {", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -42248,349 +42106,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{sc_name}}\"\n}" + "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" }, "description": "" }, "response": [] - }, + } + ] + }, + { + "name": "43-Servicegroups", + "description": "Tests all commands to manage service groups.", + "item": [ { - "name": "Unsetseverity", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setcontactgroup", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getcontactgroup", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name)", - " {", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "43-Servicegroups", - "description": "Tests all commands to manage service groups.", - "item": [ - { - "name": "Add service group", + "name": "Add service group", "event": [ { "listen": "test", @@ -43113,2711 +42642,15 @@ "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getservice", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serviceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of services\"] = serviceData;", - " var i = 0;", - " while (i < serviceData.length) {", - " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'])", - " {", - " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", - " tests[\"Body contains added service\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"service_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addhostgroupservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addhostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delhostgroupservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delhostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Sethostgroupservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"sethostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Gethostgroupservice", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var hgserviceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of host group services\"] = hgserviceData;", - " var i = 0;", - " while (i < hgserviceData.length) {", - " if (postman.getEnvironmentVariable(\"hgservice_description\") == hgserviceData[i]['service description'])", - " {", - " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgserviceData[i]['hostgroup name'];", - " tests[\"Body contains added host hgservice_description\"] = postman.getEnvironmentVariable(\"hgservice_description\") == hgserviceData[i]['service description'];", - " break;", - " }", - " i++;", - " }", - " if (i == hgserviceData.length)", - " tests[\"hg_service_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"gethostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "44-Services_Categories", - "description": "Tests all commands to manage service categories.", - "item": [ - { - "name": "Setparam description", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};description;{{sc_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List service category", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var scData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of service categories\"] = scData;", - " var i = 0;", - " while (i < scData.length) {", - " if (postman.getEnvironmentVariable(\"sc_name\") == scData[i].name)", - " {", - " tests[\"Body contains added service category\"] = postman.getEnvironmentVariable(\"sc_name\") == scData[i].name;", - " tests[\"Body contains added description\"] = postman.getEnvironmentVariable(\"sc_description\") == scData[i].description;", - " break;", - " }", - " i++;", - " }", - " if (i == scData.length)", - " tests[\"sc_name was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"sc\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getservice", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serviceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of services\"] = serviceData;", - " var i = 0;", - " while (i < serviceData.length) {", - " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'])", - " {", - " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", - " tests[\"Body contains added service_description\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"service_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setservice", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addservicetemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getservicetemplate", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var stplData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of stpl_description\"] = stplData;", - " var i = 0;", - " while (i < stplData.length) {", - " if (postman.getEnvironmentVariable(\"stpl_description\") == hgserviceData[i]['service template description']){", - " tests[\"Body contains added stpl_description\"] = postman.getEnvironmentVariable(\"stpl_description\") == stplData[i]['service template description'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"stpl_description was found\"] = false;", - "}", - "catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"getservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delservicetemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setservicetemplate", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "50-Traps_Vendors", - "description": "Tests all commands to manage vendors.", - "item": [ - { - "name": "Add vendor", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;test_alias\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;name;{{vendor_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam alias", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};alias;{{vendor_alias}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam description", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};description;{{vendor_description}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List vendors", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var vendorData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of vendors\"] = vendorData;", - " var i = 0;", - " while (i < vendorData.length) {", - " if (postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name) {", - " tests[\"Body contains added vendor\"] = postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name;", - " tests[\"Body contains added vendor_alias\"] = postman.getEnvironmentVariable(\"vendor_alias\") == vendorData[i].alias;", - " break;", - " }", - " i++;", - " }", - " if (i == vendorData.length)", - " tests[\"vendor_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"show\",\n \"object\":\"vendor\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Generatetraps", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"generatetraps\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};{{mib_path}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "51-Traps_SNMP", - "description": "Tests all commands to manage traps.", - "item": [ - { - "name": "Setparam comment", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};comments;{{trap_comment}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam output", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};output;{{trap_output}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam oid", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};oid;{{trap_oid}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam status", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};status;{{trap_status}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam vendor", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};vendor;{{trap_vendor}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam matching_mode", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};matching_mode;{{trap_matching_mode}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam reschedule_svc_enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};reschedule_svc_enable;{{trap_reschedule_svc_enable}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam execution_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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command;{{command_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam exec_command_enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command_enable;{{trap_exec_command_enable}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam submit_result_enable", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};submit_result_enable;{{trap_submit_result_enable}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List traps", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var trapData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of matchings\"] = trapData;", - " var i = 0;", - " while (i < trapData.length) {", - " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name) {", - " tests[\"Body contains added trap\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", - " tests[\"Body contains added trap oid\"] = postman.getEnvironmentVariable(\"trap_oid\") == trapData[i].oid;", - " break;", - " }", - " i++;", - " }", - " if (i == trapData.length)", - " tests[\"trap_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"show\",\n \"object\":\"trap\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addmatching", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"addmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};test_string;test_reg_exp;ok\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Get matching id", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var matchingData = jsonData.result;", - "", - "try {", - " var i = 0;", - " while (i < matchingData.length) {", - " if (\"test_string\" == matchingData[i].string) {", - " postman.setEnvironmentVariable(\"trap_matching_token\",matchingData[i].id);", - " break;", - " }", - " i++;", - " }", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "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" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Updatematching name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};string;{{trap_string}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Updatematching order", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};order;{{trap_matching_order}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Updatematching status", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};status;{{trap_status_string}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Updatematching regexp", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};regexp;{{trap_reg_exp}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmatching", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var matchingData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of matchings\"] = matchingData;", - " var i = 0;", - " while (i < matchingData.length) {", - " if (postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string) {", - " tests[\"Body contains added string\"] = postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string;", - " tests[\"Body contains added regular expression\"] = postman.getEnvironmentVariable(\"trap_reg_exp\") == matchingData[i].regexp;", - " tests[\"Body contains added matching status\"] = postman.getEnvironmentVariable(\"trap_status_string\") == matchingData[i].status;", - " tests[\"Body contains added matching order\"] = postman.getEnvironmentVariable(\"trap_matching_order\") == matchingData[i].order;", - " break;", - " }", - " i++;", - " }", - " if (i == matchingData.length)", - " tests[\"trap_string was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", - "equals": true, - "key": "action", - "value": "action" - }, - { - "description": "", - "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Delmatching", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "60-Downtimes", - "description": "Tests all commands to manage downtimes.", - "item": [ - { - "name": "Add downtime", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;descritpion_test\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -45825,32 +42658,52 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;name;{{downtime_name}}\"\n}" + "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam description", + "name": "Getservice", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of services\"] = serviceData;", + " var i = 0;", + " while (i < serviceData.length) {", + " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'])", + " {", + " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", + " tests[\"Body contains added service\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"service_description was found\"] = false;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -45871,11 +42724,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -45883,51 +42740,32 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};description;{{downtime_description}}\"\n}" + "raw": "{\n \"action\": \"getservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "List downtimes", + "name": "Addhostgroupservice", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var downtimeData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of downtimes\"] = downtimeData;", - " var i = 0;", - " while (i < downtimeData.length) {", - " if (postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name){", - " tests[\"Body contains added downtime_name\"] = postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name;", - " tests[\"Body contains added downtime_description\"] = postman.getEnvironmentVariable(\"downtime_description\") == downtimeData[i].description;", - " break;", - " }", - " i++;", - " }", - " if (i == engineData.length)", - " tests[\"enine_name was found\"] = false;", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -45976,14 +42814,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"DOWNTIME\"\n}" + "raw": "{\n \"action\": \"addhostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addweeklyperiod", + "name": "Delhostgroupservice", "event": [ { "listen": "test", @@ -46010,11 +42848,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -46022,26 +42864,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addweeklyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{weekly_start_time}};{{weekly_end_time}};{{weekly_fixed}};{{weekly_duration}};{{weekly_day_of_week}}\"\n}" + "raw": "{\n \"action\": \"delhostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addmonthlyperiod", + "name": "Sethostgroupservice", "event": [ { "listen": "test", @@ -46068,11 +42910,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -46080,32 +42926,52 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addmonthlyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{monthly_start_time}};{{monthly_end_time}};{{monthly_fixed}};{{monthly_duration}};{{monthly_day_of_month}}\"\n}" + "raw": "{\n \"action\": \"sethostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{hg_name}},{{hgservice_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addspecificperiod", + "name": "Gethostgroupservice", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hgserviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of host group services\"] = hgserviceData;", + " var i = 0;", + " while (i < hgserviceData.length) {", + " if (postman.getEnvironmentVariable(\"hgservice_description\") == hgserviceData[i]['service description'])", + " {", + " tests[\"Body contains added hg_name\"] = postman.getEnvironmentVariable(\"hg_name\") == hgserviceData[i]['hostgroup name'];", + " tests[\"Body contains added host hgservice_description\"] = postman.getEnvironmentVariable(\"hgservice_description\") == hgserviceData[i]['service description'];", + " break;", + " }", + " i++;", + " }", + " if (i == hgserviceData.length)", + " tests[\"hg_service_description was found\"] = false;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -46126,11 +42992,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -46138,75 +43008,38 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addspecificperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{specific_start}};{{specific_end}};{{specific_fixed}};{{specific_duration}};{{specific_day_of_week}};{{specific_month_cycle}}\"\n}" + "raw": "{\n \"action\": \"gethostgroupservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}}\"\n}" }, "description": "" }, "response": [] - }, + } + ] + }, + { + "name": "44-Services_Categories", + "description": "Tests all commands to manage service categories.", + "item": [ { - "name": "List periods", + "name": "Setparam description", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var downtimeData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of downtimes\"] = downtimeData;", - " var test_start_w = postman.getEnvironmentVariable(\"weekly_start_time\") + ':00';", - " var test_start_m = postman.getEnvironmentVariable(\"monthly_start_time\") + ':00';", - " var test_start_s = postman.getEnvironmentVariable(\"specific_start\") + ':00';", - " for (var i = 0; i < downtimeData.length; i++) {", - " if (test_start_w == downtimeData[i]['start time'])", - " {", - " tests[\"Body contains added weekly_start_time\"] = test_start_w == downtimeData[i]['start time'];", - " var test_end = postman.getEnvironmentVariable(\"weekly_end_time\") + ':00';", - " tests[\"Body contains added weekly_end_time\"] = test_end == downtimeData[i]['end time'];", - " tests[\"Body contains added weekly_fixed\"] = postman.getEnvironmentVariable(\"weekly_fixed\") == downtimeData[i].fixed;", - " if (downtimeData[i].fixed == \"0\")", - " tests[\"Body contains added weekly_duration\"] = postman.getEnvironmentVariable(\"weekly_duration\") == downtimeData[i].duration;", - " tests[\"Body contains added weekly_day_of_week\"] = postman.getEnvironmentVariable(\"weekly_number_days_of_week\") == downtimeData[i]['day of week'];", - " }", - " if (test_start_m == downtimeData[i]['start time'])", - " {", - " tests[\"Body contains added monthly_start_time\"] = test_start_m == downtimeData[1]['start time'];", - " var test_end = postman.getEnvironmentVariable(\"monthly_end_time\") + ':00';", - " tests[\"Body contains added monthly_end_time\"] = test_end == downtimeData[i]['end time'];", - " tests[\"Body contains added monthly_fixed\"] = postman.getEnvironmentVariable(\"monthly_fixed\") == downtimeData[i].fixed;", - " if (downtimeData[i].fixed == \"0\")", - " tests[\"Body contains added monthly_duration\"] = postman.getEnvironmentVariable(\"monthly_duration\") == downtimeData[i].duration;", - " tests[\"Body contains added monthly_day_of_month\"] = postman.getEnvironmentVariable(\"monthly_day_of_month\") == downtimeData[i]['day of month'];", - " }", - " if (test_start_s == downtimeData[i]['start time'])", - " {", - " tests[\"Body contains added specific_start_time\"] = test_start_s == downtimeData[i]['start time'];", - " var test_end = postman.getEnvironmentVariable(\"specific_end\") + ':00';", - " tests[\"Body contains added specific_end_time\"] = test_end == downtimeData[i]['end time'];", - " tests[\"Body contains added specific_fixed\"] = postman.getEnvironmentVariable(\"specific_fixed\") == downtimeData[i].fixed;", - " if (downtimeData[i].fixed == \"0\")", - " tests[\"Body contains added specific_duration\"] = postman.getEnvironmentVariable(\"specific_duration\") == downtimeData[i].duration;", - " tests[\"Body contains added specific_day_of_week\"] = postman.getEnvironmentVariable(\"specific_number_day_of_week\") == downtimeData[i]['day of week'];", - " }", - " }", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -46251,20 +43084,40 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"listperiods\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};description;{{sc_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addhost", + "name": "List service category", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var scData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of service categories\"] = scData;", + " var i = 0;", + " while (i < scData.length) {", + " if (postman.getEnvironmentVariable(\"sc_name\") == scData[i].name)", + " {", + " tests[\"Body contains added service category\"] = postman.getEnvironmentVariable(\"sc_name\") == scData[i].name;", + " tests[\"Body contains added description\"] = postman.getEnvironmentVariable(\"sc_description\") == scData[i].description;", + " break;", + " }", + " i++;", + " }", + " if (i == scData.length)", + " tests[\"sc_name was found\"] = false;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -46284,16 +43137,16 @@ ], "query": [ { - "key": "action", - "value": "action", + "description": "", "equals": true, - "description": "" + "key": "action", + "value": "action" }, { - "key": "object", - "value": "centreon_clapi", + "description": "", "equals": true, - "description": "" + "key": "object", + "value": "centreon_clapi" } ], "variable": [] @@ -46301,26 +43154,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" + "raw": "{\n \"action\": \"show\",\n \"object\": \"sc\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delhost", + "name": "Addservice", "event": [ { "listen": "test", @@ -46375,20 +43228,40 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" + "raw": "{\n \"action\": \"addservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Sethost", + "name": "Getservice", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of services\"] = serviceData;", + " var i = 0;", + " while (i < serviceData.length) {", + " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'])", + " {", + " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", + " tests[\"Body contains added service_description\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"service_description was found\"] = false;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -46437,14 +43310,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"sethost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" + "raw": "{\n \"action\": \"getservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addhostgroup", + "name": "Delservice", "event": [ { "listen": "test", @@ -46499,14 +43372,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" + "raw": "{\n \"action\": \"delservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delhostgroup", + "name": "Addservicetemplate", "event": [ { "listen": "test", @@ -46561,20 +43434,38 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" + "raw": "{\n \"action\": \"addservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Sethostgroup", + "name": "Getservicetemplate", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var stplData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of stpl_description\"] = stplData;", + " var i = 0;", + " while (i < stplData.length) {", + " if (postman.getEnvironmentVariable(\"stpl_description\") == hgserviceData[i]['service template description']){", + " tests[\"Body contains added stpl_description\"] = postman.getEnvironmentVariable(\"stpl_description\") == stplData[i]['service template description'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"stpl_description was found\"] = false;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -46623,14 +43514,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" + "raw": "{\n \"action\": \"getservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addservice", + "name": "Delservicetemplate", "event": [ { "listen": "test", @@ -46685,14 +43576,78 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" + "raw": "{\n \"action\": \"delservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "50-Traps_Vendors", + "description": "Tests all commands to manage vendors.", + "item": [ + { + "name": "Add vendor", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;test_alias\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delservice", + "name": "Setparam name", "event": [ { "listen": "test", @@ -46719,15 +43674,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -46735,26 +43686,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;name;{{vendor_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setservice", + "name": "Setparam alias", "event": [ { "listen": "test", @@ -46781,15 +43732,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -46797,26 +43744,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};alias;{{vendor_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addservicegroup", + "name": "Setparam description", "event": [ { "listen": "test", @@ -46843,15 +43790,91 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};description;{{vendor_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List vendors", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var vendorData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of vendors\"] = vendorData;", + " var i = 0;", + " while (i < vendorData.length) {", + " if (postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name) {", + " tests[\"Body contains added vendor\"] = postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name;", + " tests[\"Body contains added vendor_alias\"] = postman.getEnvironmentVariable(\"vendor_alias\") == vendorData[i].alias;", + " break;", + " }", + " i++;", + " }", + " if (i == vendorData.length)", + " tests[\"vendor_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", "equals": true, - "description": "" + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" } ], "variable": [] @@ -46859,26 +43882,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" + "raw": "{\n \"action\":\"show\",\n \"object\":\"vendor\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delservicegroup", + "name": "Generatetraps", "event": [ { "listen": "test", @@ -46905,15 +43928,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -46921,26 +43940,32 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" + "raw": "{\n \"action\": \"generatetraps\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};{{mib_path}}\"\n}" }, "description": "" }, "response": [] - }, + } + ] + }, + { + "name": "51-Traps_SNMP", + "description": "Tests all commands to manage traps.", + "item": [ { - "name": "Setservicegroup", + "name": "Setparam comment", "event": [ { "listen": "test", @@ -46967,15 +43992,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -46983,78 +44004,33 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};comments;{{trap_comment}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Show Service Realtime", + "name": "Setparam output", "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\";", - "", - "var jsonData = JSON.parse(responseBody);", - "var result = jsonData.result;", - "", - "var schema = {", - " \"type\": \"array\",", - " \"items\": {", - " \"type\": \"object\",", - " \"properties\": {", - " \"host_name\": {", - " \"type\": \"string\"", - " },", - " \"service_name\": {", - " \"type\": \"string\"", - " },", - " \"author\": {", - " \"type\": \"string\"", - " },", - " \"actual_start_time\": {", - " \"type\": \"string\"", - " },", - " \"end_time\": {", - " \"type\": \"string\"", - " },", - " \"comment_data\": {", - " \"type\": \"string\"", - " },", - " \"duration\": {", - " \"type\": \"string\"", - " },", - " \"fixed\": {", - " \"type\": \"string\"", - " },", - " \"url\": {", - " \"type\": \"string\"", - " }", - " },", - " \"additionalProperties\": false,", - " \"required\": [\"host_name\", \"service_name\", \"author\", \"actual_start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", - " }", - "}", - "", - "tests[\"Validate schema JSON\"] = tv4.validate(result, schema);" + "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } } @@ -47074,15 +44050,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -47090,75 +44062,33 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;esx-alger-01|ping\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};output;{{trap_output}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Show Host Realtime", + "name": "Setparam oid", "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\";", - "", - "var jsonData = JSON.parse(responseBody);", - "var result = jsonData.result;", - "", - "var schema = {", - " \"type\": \"array\",", - " \"items\": {", - " \"type\": \"object\",", - " \"properties\": {", - " \"host_name\": {", - " \"type\": \"string\"", - " },", - " \"author\": {", - " \"type\": \"string\"", - " },", - " \"actual_start_time\": {", - " \"type\": \"string\"", - " },", - " \"end_time\": {", - " \"type\": \"string\"", - " },", - " \"comment_data\": {", - " \"type\": \"string\"", - " },", - " \"duration\": {", - " \"type\": \"string\"", - " },", - " \"fixed\": {", - " \"type\": \"string\"", - " },", - " \"url\": {", - " \"type\": \"string\"", - " }", - " },", - " \"additionalProperties\": false,", - " \"required\": [\"host_name\", \"author\", \"actual_start_time\", \"end_time\", \"comment_data\", \"duration\", \"fixed\", \"url\"]", - " }", - "}", - "", - "tests[\"Validate schema JSON\"] = tv4.validate(result, schema);" + "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } } @@ -47178,15 +44108,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -47194,44 +44120,33 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;esx-alger-01\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};oid;{{trap_oid}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addhost Realtime", + "name": "Setparam status", "event": [ { - "listen": "prerequest", + "listen": "test", "script": { "type": "text/javascript", "exec": [ - "postman.setGlobalVariable(\"fixed\", \"1\");", - "", - "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + ('0' + date.getHours()).slice(-2) + \":\" + ", - " ('0' + date.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", - "", - "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + ('0' + dateEnd.getHours()).slice(-2) + \":\" + ", - "('0' + dateEnd.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"end_time\", datetime_end);", - "" + "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } } @@ -47251,15 +44166,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -47267,26 +44178,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;esx-alger-01;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire\"\n}\n" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};status;{{trap_status}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addservice Realtime", + "name": "Setparam vendor", "event": [ { "listen": "test", @@ -47296,26 +44207,6 @@ "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } - }, - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "postman.setGlobalVariable(\"fixed\", \"1\");", - "", - "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + ('0' + date.getHours()).slice(-2) + \":\" + ", - " ('0' + date.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", - "", - "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + ('0' + dateEnd.getHours()).slice(-2) + \":\" + ", - "('0' + dateEnd.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"end_time\", datetime_end);", - "" - ] - } } ], "request": { @@ -47333,15 +44224,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -47349,26 +44236,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SVC;esx-alger-01|ping;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};vendor;{{trap_vendor}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addhostgroup Realtime", + "name": "Setparam matching_mode", "event": [ { "listen": "test", @@ -47378,25 +44265,6 @@ "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } - }, - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "postman.setGlobalVariable(\"fixed\", \"1\");", - "", - "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", - " ('0' + date.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", - "", - "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", - "('0' + dateEnd.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"end_time\", datetime_end);" - ] - } } ], "request": { @@ -47414,15 +44282,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -47430,26 +44294,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HG;Databases1;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};matching_mode;{{trap_matching_mode}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addservicegroup Realtime", + "name": "Setparam reschedule_svc_enable", "event": [ { "listen": "test", @@ -47459,25 +44323,6 @@ "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } - }, - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "postman.setGlobalVariable(\"fixed\", \"1\");", - "", - "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", - " ('0' + date.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", - "", - "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", - "('0' + dateEnd.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"end_time\", datetime_end);" - ] - } } ], "request": { @@ -47495,15 +44340,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -47511,26 +44352,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"SG;Traffic-Europe;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};reschedule_svc_enable;{{trap_reschedule_svc_enable}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addinstance Realtime", + "name": "Setparam execution_command", "event": [ { "listen": "test", @@ -47540,25 +44381,6 @@ "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } - }, - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "exec": [ - "postman.setGlobalVariable(\"fixed\", \"1\");", - "", - "var date = new Date();", - "var datetime_start = date.getFullYear() + \"/\" + ('0' + (date.getMonth()+1)).slice(-2) + \"/\" + ('0' + date.getDate()).slice(-2) + \" \" + date.getHours() + \":\" + ", - " ('0' + date.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"actual_start_time\", datetime_start);", - "", - "var dateEnd = new Date(date.setHours(date.getHours()+1));", - "var datetime_end = dateEnd.getFullYear() + \"/\" + ('0' + (dateEnd.getMonth()+1)).slice(-2) + \"/\" + ('0' + dateEnd.getDate()).slice(-2) + \" \" + dateEnd.getHours() + \":\" + ", - "('0' + dateEnd.getMinutes()).slice(-2);", - "postman.setEnvironmentVariable(\"end_time\", datetime_end);" - ] - } } ], "request": { @@ -47576,15 +44398,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -47592,32 +44410,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"RTDOWNTIME\",\n \"values\": \"HOST;Central;{{actual_start_time}};{{end_time}};1;3600;0;Ceci est un commentaire;\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command;{{command_name}}\"\n}" }, "description": "" }, "response": [] - } - ] - }, - { - "name": "61-Dependencies", - "description": "Tests all commands to manage dependencies.", - "item": [ + }, { - "name": "Add dependency", + "name": "Setparam exec_command_enable", "event": [ { "listen": "test", @@ -47644,15 +44456,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -47660,26 +44468,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"dep\",\n \"values\": \"dep_test;test_description;{{dep_type}};{{host_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command_enable;{{trap_exec_command_enable}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam name", + "name": "Setparam submit_result_enable", "event": [ { "listen": "test", @@ -47730,20 +44538,38 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"dep_test;name;{{dep_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};submit_result_enable;{{trap_submit_result_enable}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam description", + "name": "List traps", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var trapData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of matchings\"] = trapData;", + " var i = 0;", + " while (i < trapData.length) {", + " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name) {", + " tests[\"Body contains added trap\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", + " tests[\"Body contains added trap oid\"] = postman.getEnvironmentVariable(\"trap_oid\") == trapData[i].oid;", + " break;", + " }", + " i++;", + " }", + " if (i == trapData.length)", + " tests[\"trap_name was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -47763,10 +44589,14 @@ ], "query": [ { + "description": "", + "equals": true, "key": "action", "value": "action" }, { + "description": "", + "equals": true, "key": "object", "value": "centreon_clapi" } @@ -47788,14 +44618,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};description;{{dep_description}}\"\n}" + "raw": "{\n \"action\":\"show\",\n \"object\":\"trap\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam comment", + "name": "Addmatching", "event": [ { "listen": "test", @@ -47846,20 +44676,34 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};comment;{{dep_comment}}\"\n}" + "raw": "{\n \"action\": \"addmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};test_string;test_reg_exp;ok\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam inherits_parent", + "name": "Get matching id", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var matchingData = jsonData.result;", + "", + "try {", + " var i = 0;", + " while (i < matchingData.length) {", + " if (\"test_string\" == matchingData[i].string) {", + " postman.setEnvironmentVariable(\"trap_matching_token\",matchingData[i].id);", + " break;", + " }", + " i++;", + " }", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -47904,14 +44748,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};inherits_parent;{{dep_inherits_parent}}\"\n}" + "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam exec_fail_criteria", + "name": "Updatematching name", "event": [ { "listen": "test", @@ -47962,14 +44806,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};execution_failure_criteria;{{dep_exec_fail_crit}}\"\n}" + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};string;{{trap_string}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam notif_fail_criteria", + "name": "Updatematching order", "event": [ { "listen": "test", @@ -48020,43 +44864,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};notification_failure_criteria;{{dep_notif_fail_crit}}\"\n}" + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};order;{{trap_matching_order}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "List dependencies", + "name": "Updatematching status", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var depData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of dependencies\"] = depData;", - " var i = 0;", - " while (i < depData.length) {", - " if (postman.getEnvironmentVariable(\"dep_name\") == depData[i].name)", - " {", - " tests[\"Body contains added dep_name\"] = postman.getEnvironmentVariable(\"dep_name\") == depData[i].name;", - " tests[\"Body contains added dep_description\"] = postman.getEnvironmentVariable(\"dep_description\") == depData[i].description;", - " tests[\"Body contains added dep_inherits_parents\"] = postman.getEnvironmentVariable(\"dep_inherits_parent\") == depData[i].inherits_parent;", - " tests[\"Body contains added dep_execution_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_exec_fail_crit\") == depData[i].execution_failure_criteria;", - " tests[\"Body contains added dep_notification_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_notif_fail_crit\") == depData[i].notification_failure_criteria;", - " break;", - " }", - " i++;", - " }", - " if (i == depData.length)", - " tests[\"dep_name was found\"] = false;", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -48076,14 +44897,10 @@ ], "query": [ { - "description": "", - "equals": true, "key": "action", "value": "action" }, { - "description": "", - "equals": true, "key": "object", "value": "centreon_clapi" } @@ -48105,14 +44922,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"dep\"\n}" + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};status;{{trap_status_string}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addparent", + "name": "Updatematching regexp", "event": [ { "listen": "test", @@ -48139,15 +44956,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -48155,32 +44968,52 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};regexp;{{trap_reg_exp}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Create host3", + "name": "Getmatching", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var matchingData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of matchings\"] = matchingData;", + " var i = 0;", + " while (i < matchingData.length) {", + " if (postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string) {", + " tests[\"Body contains added string\"] = postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string;", + " tests[\"Body contains added regular expression\"] = postman.getEnvironmentVariable(\"trap_reg_exp\") == matchingData[i].regexp;", + " tests[\"Body contains added matching status\"] = postman.getEnvironmentVariable(\"trap_status_string\") == matchingData[i].status;", + " tests[\"Body contains added matching order\"] = postman.getEnvironmentVariable(\"trap_matching_order\") == matchingData[i].order;", + " break;", + " }", + " i++;", + " }", + " if (i == matchingData.length)", + " tests[\"trap_string was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -48200,78 +45033,16 @@ ], "query": [ { - "key": "action", - "value": "action", - "equals": true, - "description": "" - }, - { - "key": "object", - "value": "centreon_clapi", + "description": "", "equals": true, - "description": "" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "description": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name3}};{{host_name3}};0.0.0.0;;central;\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Addchild", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { - "key": "object", - "value": "centreon_clapi", + "description": "", "equals": true, - "description": "" + "key": "object", + "value": "centreon_clapi" } ], "variable": [] @@ -48279,26 +45050,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" + "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delparent", + "name": "Delmatching", "event": [ { "listen": "test", @@ -48325,15 +45096,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -48341,59 +45108,38 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" + "raw": "{\n \"action\": \"delmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}}\"\n}" }, "description": "" }, "response": [] - }, + } + ] + }, + { + "name": "60-Downtimes", + "description": "Tests all commands to manage downtimes.", + "item": [ { - "name": "Listdep", + "name": "Add downtime", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var depData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of dependencies\"] = depData;", - " var i = 0;", - " var nb_find = 0", - " while (i < depData.length) {", - " if (postman.getEnvironmentVariable(\"host_name\") == depData[i].parents)", - " {", - " tests[\"Body contains added a parent\"] = postman.getEnvironmentVariable(\"host_name\") == depData[i].parents;", - " nb_find += 1;", - " }", - " if (postman.getEnvironmentVariable(\"host_name3\") == depData[i].children)", - " {", - " tests[\"Body contains added a child\"] = postman.getEnvironmentVariable(\"host_name3\") == depData[i].children;", - " nb_find += 1;", - " }", - " if (nb_find == 2)", - " break;", - " i++;", - " }", - " if (i == depData.length)", - " tests[\"the child and the parent were found\"] = i < depData.length;", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -48414,15 +45160,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -48430,94 +45172,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"listdep\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}}\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;descritpion_test\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delchild", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"delchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" - }, - "description": "" - }, - "response": [] - } - ] - }, - { - "name": "70-ACL_Groups", - "description": "Tests all commands to manage ACL groups.", - "item": [ - { - "name": "Add ACL group", + "name": "Setparam name", "event": [ { "listen": "test", @@ -48543,14 +45217,10 @@ ], "query": [ { - "description": "", - "equals": true, "key": "action", "value": "action" }, { - "description": "", - "equals": true, "key": "object", "value": "centreon_clapi" } @@ -48572,14 +45242,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;aclg_alias\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;name;{{downtime_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam name", + "name": "Setparam description", "event": [ { "listen": "test", @@ -48605,14 +45275,10 @@ ], "query": [ { - "description": "", - "equals": true, "key": "action", "value": "action" }, { - "description": "", - "equals": true, "key": "object", "value": "centreon_clapi" } @@ -48634,20 +45300,39 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;name;{{aclg_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};description;{{downtime_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam alias", + "name": "List downtimes", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var downtimeData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of downtimes\"] = downtimeData;", + " var i = 0;", + " while (i < downtimeData.length) {", + " if (postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name){", + " tests[\"Body contains added downtime_name\"] = postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name;", + " tests[\"Body contains added downtime_description\"] = postman.getEnvironmentVariable(\"downtime_description\") == downtimeData[i].description;", + " break;", + " }", + " i++;", + " }", + " if (i == engineData.length)", + " tests[\"enine_name was found\"] = false;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -48668,11 +45353,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -48680,26 +45369,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};alias;{{aclg_alias}}\"\n}" + "raw": "{\n \"action\": \"show\",\n \"object\": \"downtime\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam activate", + "name": "Addweeklyperiod", "event": [ { "listen": "test", @@ -48750,39 +45439,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};activate;{{aclg_activate}}\"\n}" + "raw": "{\n \"action\": \"addweeklyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{weekly_start_time}};{{weekly_end_time}};{{weekly_fixed}};{{weekly_duration}};{{weekly_day_of_week}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "List ACL groups", + "name": "Addmonthlyperiod", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL groups\"] = aclgData;", - " var i = 0;", - " while (i < aclgData.length) {", - " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", - " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", - " tests[\"Body contains added aclg_alias\"] = postman.getEnvironmentVariable(\"aclg_alias\") == aclgData[i].alias;", - " tests[\"Body contains added aclg_activate\"] = postman.getEnvironmentVariable(\"aclg_activate\") == aclgData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == aclgData.length)", - " tests[\"aclg_name was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -48802,14 +45472,10 @@ ], "query": [ { - "description": "", - "equals": true, "key": "action", "value": "action" }, { - "description": "", - "equals": true, "key": "object", "value": "centreon_clapi" } @@ -48831,14 +45497,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"aclgroup\"\n}" + "raw": "{\n \"action\": \"addmonthlyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{monthly_start_time}};{{monthly_end_time}};{{monthly_fixed}};{{monthly_duration}};{{monthly_day_of_month}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Add resource ACL", + "name": "Addspecificperiod", "event": [ { "listen": "test", @@ -48889,20 +45555,63 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;test_alias\"\n}" + "raw": "{\n \"action\": \"addspecificperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{specific_start}};{{specific_end}};{{specific_fixed}};{{specific_duration}};{{specific_day_of_week}};{{specific_month_cycle}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam name", + "name": "List periods", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var downtimeData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of downtimes\"] = downtimeData;", + " var test_start_w = postman.getEnvironmentVariable(\"weekly_start_time\") + ':00';", + " var test_start_m = postman.getEnvironmentVariable(\"monthly_start_time\") + ':00';", + " var test_start_s = postman.getEnvironmentVariable(\"specific_start\") + ':00';", + " for (var i = 0; i < downtimeData.length; i++) {", + " if (test_start_w == downtimeData[i]['start time'])", + " {", + " tests[\"Body contains added weekly_start_time\"] = test_start_w == downtimeData[i]['start time'];", + " var test_end = postman.getEnvironmentVariable(\"weekly_end_time\") + ':00';", + " tests[\"Body contains added weekly_end_time\"] = test_end == downtimeData[i]['end time'];", + " tests[\"Body contains added weekly_fixed\"] = postman.getEnvironmentVariable(\"weekly_fixed\") == downtimeData[i].fixed;", + " if (downtimeData[i].fixed == \"0\")", + " tests[\"Body contains added weekly_duration\"] = postman.getEnvironmentVariable(\"weekly_duration\") == downtimeData[i].duration;", + " tests[\"Body contains added weekly_day_of_week\"] = postman.getEnvironmentVariable(\"weekly_number_days_of_week\") == downtimeData[i]['day of week'];", + " }", + " if (test_start_m == downtimeData[i]['start time'])", + " {", + " tests[\"Body contains added monthly_start_time\"] = test_start_m == downtimeData[1]['start time'];", + " var test_end = postman.getEnvironmentVariable(\"monthly_end_time\") + ':00';", + " tests[\"Body contains added monthly_end_time\"] = test_end == downtimeData[i]['end time'];", + " tests[\"Body contains added monthly_fixed\"] = postman.getEnvironmentVariable(\"monthly_fixed\") == downtimeData[i].fixed;", + " if (downtimeData[i].fixed == \"0\")", + " tests[\"Body contains added monthly_duration\"] = postman.getEnvironmentVariable(\"monthly_duration\") == downtimeData[i].duration;", + " tests[\"Body contains added monthly_day_of_month\"] = postman.getEnvironmentVariable(\"monthly_day_of_month\") == downtimeData[i]['day of month'];", + " }", + " if (test_start_s == downtimeData[i]['start time'])", + " {", + " tests[\"Body contains added specific_start_time\"] = test_start_s == downtimeData[i]['start time'];", + " var test_end = postman.getEnvironmentVariable(\"specific_end\") + ':00';", + " tests[\"Body contains added specific_end_time\"] = test_end == downtimeData[i]['end time'];", + " tests[\"Body contains added specific_fixed\"] = postman.getEnvironmentVariable(\"specific_fixed\") == downtimeData[i].fixed;", + " if (downtimeData[i].fixed == \"0\")", + " tests[\"Body contains added specific_duration\"] = postman.getEnvironmentVariable(\"specific_duration\") == downtimeData[i].duration;", + " tests[\"Body contains added specific_day_of_week\"] = postman.getEnvironmentVariable(\"specific_number_day_of_week\") == downtimeData[i]['day of week'];", + " }", + " }", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -48947,14 +45656,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;name;{{racl_name}}\"\n}" + "raw": "{\n \"action\": \"listperiods\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addresource", + "name": "Addhost", "event": [ { "listen": "test", @@ -49009,14 +45718,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" + "raw": "{\n \"action\": \"addhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delresource", + "name": "Delhost", "event": [ { "listen": "test", @@ -49071,14 +45780,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" + "raw": "{\n \"action\": \"delhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setresource", + "name": "Sethost", "event": [ { "listen": "test", @@ -49133,37 +45842,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" + "raw": "{\n \"action\": \"sethost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getresource", + "name": "Addhostgroup", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var raclData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL resources\"] = raclData;", - " var i = 0;", - " while (i < raclData.length) {", - " if (postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name) {", - " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == raclData.length)", - " tests[\"racl_name was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -49212,14 +45904,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addcontact", + "name": "Delhostgroup", "event": [ { "listen": "test", @@ -49274,14 +45966,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" + "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delcontact", + "name": "Sethostgroup", "event": [ { "listen": "test", @@ -49336,14 +46028,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setcontact", + "name": "Addservice", "event": [ { "listen": "test", @@ -49398,37 +46090,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" + "raw": "{\n \"action\": \"addservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getcontact", + "name": "Delservice", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", - " tests[\"Body contains added contact\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"aclg_contact_alias was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -49477,14 +46152,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + "raw": "{\n \"action\": \"delservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addcontactgroup", + "name": "Setservice", "event": [ { "listen": "test", @@ -49539,14 +46214,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" + "raw": "{\n \"action\": \"setservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delcontactgroup", + "name": "Addservicegroup", "event": [ { "listen": "test", @@ -49601,14 +46276,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" + "raw": "{\n \"action\": \"addservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setcontactgroup", + "name": "Delservicegroup", "event": [ { "listen": "test", @@ -49663,37 +46338,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" + "raw": "{\n \"action\": \"delservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getcontactgroup", + "name": "Setservicegroup", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -49742,14 +46400,82 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + "raw": "{\n \"action\": \"setservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "61-Dependencies", + "description": "Tests all commands to manage dependencies.", + "item": [ + { + "name": "Add dependency", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"dep\",\n \"values\": \"dep_test;test_description;{{dep_type}};{{host_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Add ACL Menu", + "name": "Setparam name", "event": [ { "listen": "test", @@ -49800,14 +46526,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;test_alias\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"dep_test;name;{{dep_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam name", + "name": "Setparam description", "event": [ { "listen": "test", @@ -49858,14 +46584,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;name;{{aclmenu_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};description;{{dep_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addmenu", + "name": "Setparam comment", "event": [ { "listen": "test", @@ -49892,15 +46618,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -49908,26 +46630,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};comment;{{dep_comment}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delmenu", + "name": "Setparam inherits_parent", "event": [ { "listen": "test", @@ -49954,15 +46676,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -49970,26 +46688,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};inherits_parent;{{dep_inherits_parent}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setmenu", + "name": "Setparam exec_fail_criteria", "event": [ { "listen": "test", @@ -50016,15 +46734,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -50032,49 +46746,32 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};execution_failure_criteria;{{dep_exec_fail_crit}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getmenu", + "name": "Setparam notif_fail_criteria", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclmenuData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL menus\"] = aclmenuData;", - " var i = 0;", - " while (i < aclmenuData.length) {", - " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", - " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == aclmenuData.length)", - " tests[\"menu_name was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -50095,15 +46792,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -50111,32 +46804,55 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};notification_failure_criteria;{{dep_notif_fail_crit}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Add ACL action", + "name": "List dependencies", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var depData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of dependencies\"] = depData;", + " var i = 0;", + " while (i < depData.length) {", + " if (postman.getEnvironmentVariable(\"dep_name\") == depData[i].name)", + " {", + " tests[\"Body contains added dep_name\"] = postman.getEnvironmentVariable(\"dep_name\") == depData[i].name;", + " tests[\"Body contains added dep_description\"] = postman.getEnvironmentVariable(\"dep_description\") == depData[i].description;", + " tests[\"Body contains added dep_inherits_parents\"] = postman.getEnvironmentVariable(\"dep_inherits_parent\") == depData[i].inherits_parent;", + " tests[\"Body contains added dep_execution_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_exec_fail_crit\") == depData[i].execution_failure_criteria;", + " tests[\"Body contains added dep_notification_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_notif_fail_crit\") == depData[i].notification_failure_criteria;", + " break;", + " }", + " i++;", + " }", + " if (i == depData.length)", + " tests[\"dep_name was found\"] = false;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -50185,14 +46901,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;acla_description\"\n}" + "raw": "{\n \"action\": \"show\",\n \"object\": \"dep\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam name", + "name": "Addparent", "event": [ { "listen": "test", @@ -50218,16 +46934,16 @@ ], "query": [ { - "description": "", - "equals": true, "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { - "description": "", - "equals": true, "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -50235,26 +46951,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;name;{{acla_name}}\"\n}" + "raw": "{\n \"action\": \"addparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addaction", + "name": "Create host3", "event": [ { "listen": "test", @@ -50309,14 +47025,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name3}};{{host_name3}};0.0.0.0;;central;\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delaction", + "name": "Addchild", "event": [ { "listen": "test", @@ -50371,14 +47087,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" + "raw": "{\n \"action\": \"addchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setaction", + "name": "Delparent", "event": [ { "listen": "test", @@ -50433,14 +47149,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" + "raw": "{\n \"action\": \"delparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getaction", + "name": "Listdep", "event": [ { "listen": "test", @@ -50448,21 +47164,31 @@ "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", - "var aclaData = jsonData.result;", + "var depData = jsonData.result;", "", "try {", - " tests[\"Body contains list of ACL actions\"] = aclaData;", + " tests[\"Body contains list of dependencies\"] = depData;", " var i = 0;", - " while (i < aclaData.length) {", - " if (postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name) {", - " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name;", - " break;", + " var nb_find = 0", + " while (i < depData.length) {", + " if (postman.getEnvironmentVariable(\"host_name\") == depData[i].parents)", + " {", + " tests[\"Body contains added a parent\"] = postman.getEnvironmentVariable(\"host_name\") == depData[i].parents;", + " nb_find += 1;", + " }", + " if (postman.getEnvironmentVariable(\"host_name3\") == depData[i].children)", + " {", + " tests[\"Body contains added a child\"] = postman.getEnvironmentVariable(\"host_name3\") == depData[i].children;", + " nb_find += 1;", " }", + " if (nb_find == 2)", + " break;", " i++;", " }", - " if (i == aclaData.length)", - " tests[\"acla_name was found\"] = false;", - "} catch (e) {}", + " if (i == depData.length)", + " tests[\"the child and the parent were found\"] = i < depData.length;", + "}", + "catch (e) {}", "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] @@ -50512,20 +47238,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + "raw": "{\n \"action\": \"listdep\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}}\"\n}" }, "description": "" }, "response": [] - } - ] - }, - { - "name": "71-ACL_Menus", - "description": "Tests all commands to manage ACL menu.", - "item": [ + }, { - "name": "Setparam alias", + "name": "Delchild", "event": [ { "listen": "test", @@ -50552,11 +47272,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -50564,26 +47288,32 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};alias;{{aclmenu_alias}}\"\n}" + "raw": "{\n \"action\": \"delchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" }, "description": "" }, "response": [] - }, + } + ] + }, + { + "name": "70-ACL_Groups", + "description": "Tests all commands to manage ACL groups.", + "item": [ { - "name": "Setparam activate", + "name": "Add ACL group", "event": [ { "listen": "test", @@ -50609,10 +47339,14 @@ ], "query": [ { + "description": "", + "equals": true, "key": "action", "value": "action" }, { + "description": "", + "equals": true, "key": "object", "value": "centreon_clapi" } @@ -50634,14 +47368,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};activate;{{aclmenu_activate}}\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;aclg_alias\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam comment", + "name": "Setparam name", "event": [ { "listen": "test", @@ -50667,10 +47401,14 @@ ], "query": [ { + "description": "", + "equals": true, "key": "action", "value": "action" }, { + "description": "", + "equals": true, "key": "object", "value": "centreon_clapi" } @@ -50692,40 +47430,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};comment;{{aclmenu_comment}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;name;{{aclg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "List ACL menu", + "name": "Setparam alias", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclmenuData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL Menu\"] = aclmenuData;", - " var i = 0;", - " while (i < aclmenuData.length) {", - " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", - " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", - " tests[\"Body contains added aclmenu_alias\"] = postman.getEnvironmentVariable(\"aclmenu_alias\") == aclmenuData[i].alias;", - " tests[\"Body contains added aclmenu_comment\"] = postman.getEnvironmentVariable(\"aclmenu_comment\") == aclmenuData[i].comment;", - " tests[\"Body contains added aclmenu_activate\"] = postman.getEnvironmentVariable(\"aclmenu_activate\") == aclmenuData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == aclmenuData.length)", - " tests[\"aclmenu_name was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -50745,14 +47463,10 @@ ], "query": [ { - "description": "", - "equals": true, "key": "action", "value": "action" }, { - "description": "", - "equals": true, "key": "object", "value": "centreon_clapi" } @@ -50774,37 +47488,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"aclmenu\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};alias;{{aclg_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Get ACL Groups", + "name": "Setparam activate", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL Menu\"] = aclgData;", - " var i = 0;", - " while (i < aclgData.length) {", - " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", - " tests[\"Body contains ACL menu\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i > aclgData.length)", - " tests[\"aclg_name was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -50825,15 +47522,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -50841,32 +47534,51 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};activate;{{aclg_activate}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw Home", + "name": "List ACL groups", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL groups\"] = aclgData;", + " var i = 0;", + " while (i < aclgData.length) {", + " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", + " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", + " tests[\"Body contains added aclg_alias\"] = postman.getEnvironmentVariable(\"aclg_alias\") == aclgData[i].alias;", + " tests[\"Body contains added aclg_activate\"] = postman.getEnvironmentVariable(\"aclg_activate\") == aclgData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == aclgData.length)", + " tests[\"aclg_name was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -50886,10 +47598,14 @@ ], "query": [ { + "description": "", + "equals": true, "key": "action", "value": "action" }, { + "description": "", + "equals": true, "key": "object", "value": "centreon_clapi" } @@ -50911,14 +47627,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" + "raw": "{\n \"action\": \"show\",\n \"object\": \"aclgroup\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke Home", + "name": "Add resource ACL", "event": [ { "listen": "test", @@ -50969,14 +47685,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;test_alias\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw Custom Views", + "name": "Setparam name", "event": [ { "listen": "test", @@ -51027,14 +47743,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;name;{{racl_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke Custom Views", + "name": "Addresource", "event": [ { "listen": "test", @@ -51061,11 +47777,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -51073,26 +47793,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" + "raw": "{\n \"action\": \"addresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw Edit View", + "name": "Delresource", "event": [ { "listen": "test", @@ -51147,14 +47867,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" + "raw": "{\n \"action\": \"delresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke Edit View", + "name": "Setresource", "event": [ { "listen": "test", @@ -51209,20 +47929,37 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" + "raw": "{\n \"action\": \"setresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw Share View", + "name": "Getresource", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var raclData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL resources\"] = raclData;", + " var i = 0;", + " while (i < raclData.length) {", + " if (postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name) {", + " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == raclData.length)", + " tests[\"racl_name was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -51271,14 +48008,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" + "raw": "{\n \"action\": \"getresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke Share View", + "name": "Addcontact", "event": [ { "listen": "test", @@ -51333,14 +48070,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw Widget Parameters", + "name": "Delcontact", "event": [ { "listen": "test", @@ -51395,14 +48132,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke Widget Parameters", + "name": "Setcontact", "event": [ { "listen": "test", @@ -51457,136 +48194,37 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grantrw Add Widget", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Revoke Add Widget", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw rotation", + "name": "Getcontact", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", + " tests[\"Body contains added contact\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"aclg_contact_alias was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -51607,11 +48245,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -51619,26 +48261,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" + "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke rotation", + "name": "Addcontactgroup", "event": [ { "listen": "test", @@ -51665,11 +48307,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -51677,26 +48323,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" + "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw delete view", + "name": "Delcontactgroup", "event": [ { "listen": "test", @@ -51723,11 +48369,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -51735,26 +48385,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" + "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke delete view", + "name": "Setcontactgroup", "event": [ { "listen": "test", @@ -51781,11 +48431,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -51793,32 +48447,49 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw add view", + "name": "Getcontactgroup", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -51839,11 +48510,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -51851,26 +48526,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" + "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke add view", + "name": "Add ACL Menu", "event": [ { "listen": "test", @@ -51921,14 +48596,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;test_alias\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw set default", + "name": "Setparam name", "event": [ { "listen": "test", @@ -51979,14 +48654,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;name;{{aclmenu_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke set default", + "name": "Addmenu", "event": [ { "listen": "test", @@ -52013,11 +48688,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -52025,26 +48704,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" + "raw": "{\n \"action\": \"addmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw poller statistics", + "name": "Delmenu", "event": [ { "listen": "test", @@ -52071,11 +48750,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -52083,26 +48766,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" + "raw": "{\n \"action\": \"delmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke poller statistics", + "name": "Setmenu", "event": [ { "listen": "test", @@ -52129,11 +48812,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -52141,32 +48828,49 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" + "raw": "{\n \"action\": \"setmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw broker statistics", + "name": "Getmenu", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclmenuData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL menus\"] = aclmenuData;", + " var i = 0;", + " while (i < aclmenuData.length) {", + " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", + " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == aclmenuData.length)", + " tests[\"menu_name was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -52187,11 +48891,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -52199,26 +48907,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" + "raw": "{\n \"action\": \"getmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke broker statistics", + "name": "Add ACL action", "event": [ { "listen": "test", @@ -52244,10 +48952,14 @@ ], "query": [ { + "description": "", + "equals": true, "key": "action", "value": "action" }, { + "description": "", + "equals": true, "key": "object", "value": "centreon_clapi" } @@ -52269,14 +48981,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;acla_description\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw graphs (poller)", + "name": "Setparam name", "event": [ { "listen": "test", @@ -52302,10 +49014,14 @@ ], "query": [ { + "description": "", + "equals": true, "key": "action", "value": "action" }, { + "description": "", + "equals": true, "key": "object", "value": "centreon_clapi" } @@ -52327,14 +49043,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;name;{{acla_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke graphs (poller)", + "name": "Addaction", "event": [ { "listen": "test", @@ -52361,11 +49077,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -52373,26 +49093,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" + "raw": "{\n \"action\": \"addaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw monitoring", + "name": "Delaction", "event": [ { "listen": "test", @@ -52419,11 +49139,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -52431,26 +49155,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" + "raw": "{\n \"action\": \"delaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke monitoring", + "name": "Setaction", "event": [ { "listen": "test", @@ -52477,11 +49201,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -52489,26 +49217,111 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" + "raw": "{\n \"action\": \"setaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw status details", + "name": "Getaction", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclaData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL actions\"] = aclaData;", + " var i = 0;", + " while (i < aclaData.length) {", + " if (postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name) {", + " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == aclaData.length)", + " tests[\"acla_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "71-ACL_Menus", + "description": "Tests all commands to manage ACL menu.", + "item": [ + { + "name": "Setparam alias", "event": [ { "listen": "test", @@ -52559,14 +49372,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};alias;{{aclmenu_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke status details", + "name": "Setparam activate", "event": [ { "listen": "test", @@ -52617,14 +49430,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};activate;{{aclmenu_activate}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw services (monitoring)", + "name": "Setparam comment", "event": [ { "listen": "test", @@ -52675,20 +49488,40 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};comment;{{aclmenu_comment}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services (monitoring)", + "name": "List ACL menu", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclmenuData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL Menu\"] = aclmenuData;", + " var i = 0;", + " while (i < aclmenuData.length) {", + " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", + " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", + " tests[\"Body contains added aclmenu_alias\"] = postman.getEnvironmentVariable(\"aclmenu_alias\") == aclmenuData[i].alias;", + " tests[\"Body contains added aclmenu_comment\"] = postman.getEnvironmentVariable(\"aclmenu_comment\") == aclmenuData[i].comment;", + " tests[\"Body contains added aclmenu_activate\"] = postman.getEnvironmentVariable(\"aclmenu_activate\") == aclmenuData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == aclmenuData.length)", + " tests[\"aclmenu_name was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -52708,10 +49541,14 @@ ], "query": [ { + "description": "", + "equals": true, "key": "action", "value": "action" }, { + "description": "", + "equals": true, "key": "object", "value": "centreon_clapi" } @@ -52733,20 +49570,37 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" + "raw": "{\n \"action\": \"show\",\n \"object\": \"aclmenu\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw hosts (monitoring)", + "name": "Get ACL Groups", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL Menu\"] = aclgData;", + " var i = 0;", + " while (i < aclgData.length) {", + " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", + " tests[\"Body contains ACL menu\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i > aclgData.length)", + " tests[\"aclg_name was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -52767,11 +49621,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -52779,26 +49637,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" + "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke hosts (monitoring)", + "name": "Grant Home", "event": [ { "listen": "test", @@ -52849,14 +49707,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw services grid", + "name": "Revoke Home", "event": [ { "listen": "test", @@ -52907,14 +49765,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services grid", + "name": "Grant Custom Views", "event": [ { "listen": "test", @@ -52965,14 +49823,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw services by hostgroup", + "name": "Revoke Custom Views", "event": [ { "listen": "test", @@ -53023,14 +49881,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services by hostgroup", + "name": "Grant Edit View", "event": [ { "listen": "test", @@ -53057,11 +49915,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -53069,26 +49931,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw services by servicegroup", + "name": "Revoke Edit View", "event": [ { "listen": "test", @@ -53115,11 +49977,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -53127,26 +49993,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services by servicegroup", + "name": "Grant Share View", "event": [ { "listen": "test", @@ -53173,11 +50039,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -53185,26 +50055,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw hostgroups summary", + "name": "Revoke Share View", "event": [ { "listen": "test", @@ -53231,11 +50101,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -53243,26 +50117,150 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke hostgroups summary", + "name": "Grant Widget Parameters", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke Widget Parameters", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant Add Widget", "event": [ { "listen": "test", @@ -53313,14 +50311,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw performances", + "name": "Revoke Add Widget", "event": [ { "listen": "test", @@ -53371,14 +50369,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke performances", + "name": "Grant rotation", "event": [ { "listen": "test", @@ -53429,14 +50427,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw graphs", + "name": "Revoke rotation", "event": [ { "listen": "test", @@ -53487,14 +50485,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke graphs", + "name": "Grant delete view", "event": [ { "listen": "test", @@ -53545,14 +50543,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw chart split", + "name": "Revoke delete view", "event": [ { "listen": "test", @@ -53603,14 +50601,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke chart split", + "name": "Grant add view", "event": [ { "listen": "test", @@ -53661,14 +50659,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw chart periods", + "name": "Revoke add view", "event": [ { "listen": "test", @@ -53719,14 +50717,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke chart periods", + "name": "Grant set default", "event": [ { "listen": "test", @@ -53777,14 +50775,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw templates (perf)", + "name": "Revoke set default", "event": [ { "listen": "test", @@ -53835,14 +50833,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke templates (perf)", + "name": "Grant poller statistics", "event": [ { "listen": "test", @@ -53893,14 +50891,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw curves", + "name": "Revoke poller statistics", "event": [ { "listen": "test", @@ -53951,14 +50949,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke curves", + "name": "Grant broker statistics", "event": [ { "listen": "test", @@ -54009,14 +51007,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw metrics", + "name": "Revoke broker statistics", "event": [ { "listen": "test", @@ -54067,14 +51065,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke metrics", + "name": "Grant graphs (poller)", "event": [ { "listen": "test", @@ -54125,14 +51123,246 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke graphs (poller)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant monitoring", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw event logs", + "name": "Revoke monitoring", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grant status details", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke status details", "event": [ { "listen": "test", @@ -54183,14 +51413,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke event logs", + "name": "Grant services (monitoring)", "event": [ { "listen": "test", @@ -54241,14 +51471,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw event logs (advanced)", + "name": "Revoke services (monitoring)", "event": [ { "listen": "test", @@ -54299,14 +51529,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke event logs (advanced)", + "name": "Grant hosts (monitoring)", "event": [ { "listen": "test", @@ -54357,14 +51587,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw system logs", + "name": "Revoke hosts (monitoring)", "event": [ { "listen": "test", @@ -54415,14 +51645,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke system logs", + "name": "Grant services grid", "event": [ { "listen": "test", @@ -54473,14 +51703,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw downtimes", + "name": "Revoke services grid", "event": [ { "listen": "test", @@ -54531,14 +51761,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke downtimes", + "name": "Grant services by hostgroup", "event": [ { "listen": "test", @@ -54589,14 +51819,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw downtimes (main menu)", + "name": "Revoke services by hostgroup", "event": [ { "listen": "test", @@ -54647,14 +51877,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke downtimes (main menu)", + "name": "Grant services by servicegroup", "event": [ { "listen": "test", @@ -54705,14 +51935,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw recurrent downtimes", + "name": "Revoke services by servicegroup", "event": [ { "listen": "test", @@ -54763,14 +51993,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro recurrent downtimes", + "name": "Grant hostgroups summary", "event": [ { "listen": "test", @@ -54821,14 +52051,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke recurrent downtimes", + "name": "Revoke hostgroups summary", "event": [ { "listen": "test", @@ -54879,14 +52109,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw comments", + "name": "Grant performances", "event": [ { "listen": "test", @@ -54937,14 +52167,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke comments", + "name": "Revoke performances", "event": [ { "listen": "test", @@ -54995,14 +52225,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw reporting", + "name": "Grant graphs", "event": [ { "listen": "test", @@ -55053,14 +52283,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke reporting", + "name": "Revoke graphs", "event": [ { "listen": "test", @@ -55111,14 +52341,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw dashboard", + "name": "Grant chart split", "event": [ { "listen": "test", @@ -55169,14 +52399,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke dashboard", + "name": "Revoke chart split", "event": [ { "listen": "test", @@ -55227,14 +52457,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw hosts (dashboard)", + "name": "Grant chart periods", "event": [ { "listen": "test", @@ -55285,14 +52515,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke hosts (dashboard)", + "name": "Revoke chart periods", "event": [ { "listen": "test", @@ -55343,14 +52573,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw services (dashboard)", + "name": "Grant templates (perf)", "event": [ { "listen": "test", @@ -55401,14 +52631,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services (dashboard)", + "name": "Revoke templates (perf)", "event": [ { "listen": "test", @@ -55459,14 +52689,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw host groups (dashboard)", + "name": "Grant curves", "event": [ { "listen": "test", @@ -55517,14 +52747,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke host groups (dashboard)", + "name": "Revoke curves", "event": [ { "listen": "test", @@ -55575,14 +52805,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw service groups (dashboard)", + "name": "Grant metrics", "event": [ { "listen": "test", @@ -55633,14 +52863,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke service groups (dashboard)", + "name": "Revoke metrics", "event": [ { "listen": "test", @@ -55691,14 +52921,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw configuration", + "name": "Grant event logs", "event": [ { "listen": "test", @@ -55749,14 +52979,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke configuration", + "name": "Revoke event logs", "event": [ { "listen": "test", @@ -55807,14 +53037,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant hostsrw (config)", + "name": "Grant event logs (advanced)", "event": [ { "listen": "test", @@ -55865,14 +53095,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke hosts (config)", + "name": "Revoke event logs (advanced)", "event": [ { "listen": "test", @@ -55923,14 +53153,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant hostsrw (config/host)", + "name": "Grant system logs", "event": [ { "listen": "test", @@ -55981,14 +53211,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant hostsro (config/host)", + "name": "Revoke system logs", "event": [ { "listen": "test", @@ -56039,14 +53269,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke hosts (config/host)", + "name": "Grant downtimes", "event": [ { "listen": "test", @@ -56097,14 +53327,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw host groups (config/hosts)", + "name": "Revoke downtimes", "event": [ { "listen": "test", @@ -56155,14 +53385,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro host groups (config/hosts)", + "name": "Grant downtimes (main menu)", "event": [ { "listen": "test", @@ -56213,14 +53443,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke host groups (config/hosts)", + "name": "Revoke downtimes (main menu)", "event": [ { "listen": "test", @@ -56271,14 +53501,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw templates (config/hosts)", + "name": "Grant recurrent downtimes", "event": [ { "listen": "test", @@ -56329,14 +53559,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro templates (config/hosts)", + "name": "Revoke recurrent downtimes", "event": [ { "listen": "test", @@ -56387,14 +53617,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke templates (config/hosts)", + "name": "Grant comments", "event": [ { "listen": "test", @@ -56445,14 +53675,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw categories (config/hosts)", + "name": "Revoke comments", "event": [ { "listen": "test", @@ -56503,14 +53733,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro categories (config/hosts)", + "name": "Grant reporting", "event": [ { "listen": "test", @@ -56561,14 +53791,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke categories (config/hosts)", + "name": "Revoke reporting", "event": [ { "listen": "test", @@ -56619,14 +53849,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw services (config)", + "name": "Grant dashboard", "event": [ { "listen": "test", @@ -56677,14 +53907,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services (config)", + "name": "Revoke dashboard", "event": [ { "listen": "test", @@ -56735,14 +53965,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw services by host (config/services)", + "name": "Grant hosts (dashboard)", "event": [ { "listen": "test", @@ -56793,14 +54023,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro services by host (config/services)", + "name": "Revoke hosts (dashboard)", "event": [ { "listen": "test", @@ -56851,14 +54081,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services by host (config/services)", + "name": "Grant services (dashboard)", "event": [ { "listen": "test", @@ -56909,14 +54139,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw services by host group (config/services)", + "name": "Revoke services (dashboard)", "event": [ { "listen": "test", @@ -56967,14 +54197,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro services by host group (config/services)", + "name": "Grant host groups (dashboard)", "event": [ { "listen": "test", @@ -57025,14 +54255,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services by host group (config/services)", + "name": "Revoke host groups (dashboard)", "event": [ { "listen": "test", @@ -57083,14 +54313,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw service groups (config/services)", + "name": "Grant service groups (dashboard)", "event": [ { "listen": "test", @@ -57141,14 +54371,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro service groups (config/services)", + "name": "Revoke service groups (dashboard)", "event": [ { "listen": "test", @@ -57199,14 +54429,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke service groups (config/services)", + "name": "Grant configuration", "event": [ { "listen": "test", @@ -57257,14 +54487,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw templates (config/services)", + "name": "Revoke configuration", "event": [ { "listen": "test", @@ -57315,14 +54545,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro templates (config/services)", + "name": "Grant hosts (config)", "event": [ { "listen": "test", @@ -57373,14 +54603,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke templates (config/services)", + "name": "Revoke hosts (config)", "event": [ { "listen": "test", @@ -57431,14 +54661,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw categories (config/services)", + "name": "Grant hosts (config/host)", "event": [ { "listen": "test", @@ -57489,14 +54719,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro categories (config/services)", + "name": "Revoke hosts (config/host)", "event": [ { "listen": "test", @@ -57547,14 +54777,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke categories (config/services)", + "name": "Grant host groups (config/hosts)", "event": [ { "listen": "test", @@ -57605,14 +54835,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw meta services(config/services)", + "name": "Revoke host groups (config/hosts)", "event": [ { "listen": "test", @@ -57663,14 +54893,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke meta services(config/services)", + "name": "Grant templates (config/hosts)", "event": [ { "listen": "test", @@ -57721,14 +54951,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw users", + "name": "Revoke templates (config/hosts)", "event": [ { "listen": "test", @@ -57779,14 +55009,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke users", + "name": "Grant categories (config/hosts)", "event": [ { "listen": "test", @@ -57837,14 +55067,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw Contacts / Users", + "name": "Revoke categories (config/hosts)", "event": [ { "listen": "test", @@ -57895,14 +55125,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro Contacts / Users", + "name": "Grant services (config)", "event": [ { "listen": "test", @@ -57953,14 +55183,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke Contacts / Users", + "name": "Revoke services (config)", "event": [ { "listen": "test", @@ -58011,14 +55241,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw contact templates", + "name": "Grant services by host (config/services)", "event": [ { "listen": "test", @@ -58069,14 +55299,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro contact templates", + "name": "Revoke services by host (config/services)", "event": [ { "listen": "test", @@ -58127,14 +55357,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke contact templates", + "name": "Grant services by host group (config/services)", "event": [ { "listen": "test", @@ -58185,14 +55415,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw contact groups", + "name": "Revoke services by host group (config/services)", "event": [ { "listen": "test", @@ -58243,14 +55473,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro contact groups", + "name": "Grant service groups (config/services)", "event": [ { "listen": "test", @@ -58301,14 +55531,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke contact groups", + "name": "Revoke service groups (config/services)", "event": [ { "listen": "test", @@ -58359,14 +55589,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw time periods", + "name": "Grant templates (config/services)", "event": [ { "listen": "test", @@ -58417,14 +55647,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro time periods", + "name": "Revoke templates (config/services)", "event": [ { "listen": "test", @@ -58475,14 +55705,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke time periods", + "name": "Grant categories (config/services)", "event": [ { "listen": "test", @@ -58533,14 +55763,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw commands", + "name": "Revoke categories (config/services)", "event": [ { "listen": "test", @@ -58591,14 +55821,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke commands", + "name": "Grant meta services(config/services)", "event": [ { "listen": "test", @@ -58649,14 +55879,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw checks", + "name": "Revoke meta services(config/services)", "event": [ { "listen": "test", @@ -58707,14 +55937,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro checks", + "name": "Grant users", "event": [ { "listen": "test", @@ -58765,14 +55995,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke checks", + "name": "Revoke users", "event": [ { "listen": "test", @@ -58823,14 +56053,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw notifications", + "name": "Grant Contacts / Users", "event": [ { "listen": "test", @@ -58881,14 +56111,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro notifications", + "name": "Revoke Contacts / Users", "event": [ { "listen": "test", @@ -58939,14 +56169,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke notifications", + "name": "Grant contact templates", "event": [ { "listen": "test", @@ -58997,14 +56227,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw discovery", + "name": "Revoke contact templates", "event": [ { "listen": "test", @@ -59055,14 +56285,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro discovery", + "name": "Grant contact groups", "event": [ { "listen": "test", @@ -59113,14 +56343,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke discovery", + "name": "Revoke contact groups", "event": [ { "listen": "test", @@ -59171,14 +56401,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw miscellaneous", + "name": "Grant time periods", "event": [ { "listen": "test", @@ -59229,14 +56459,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro miscellaneous", + "name": "Revoke time periods", "event": [ { "listen": "test", @@ -59287,14 +56517,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke miscellaneous", + "name": "Grant commands", "event": [ { "listen": "test", @@ -59345,14 +56575,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw connectors", + "name": "Revoke commands", "event": [ { "listen": "test", @@ -59403,14 +56633,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro connectors", + "name": "Grant checks", "event": [ { "listen": "test", @@ -59461,14 +56691,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke connectors", + "name": "Revoke checks", "event": [ { "listen": "test", @@ -59519,14 +56749,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw notifications", + "name": "Grant notifications", "event": [ { "listen": "test", @@ -59577,7 +56807,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" }, "description": "" }, @@ -59635,14 +56865,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw escalations", + "name": "Grant discovery", "event": [ { "listen": "test", @@ -59693,14 +56923,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro escalations", + "name": "Revoke discovery", "event": [ { "listen": "test", @@ -59751,14 +56981,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke escalations", + "name": "Grant miscellaneous", "event": [ { "listen": "test", @@ -59809,14 +57039,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw hosts (dependencies)", + "name": "Revoke miscellaneous", "event": [ { "listen": "test", @@ -59867,14 +57097,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro hosts (dependencies)", + "name": "Grant connectors", "event": [ { "listen": "test", @@ -59925,14 +57155,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke hosts (dependencies)", + "name": "Revoke connectors", "event": [ { "listen": "test", @@ -59983,14 +57213,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw host groups (dependencies)", + "name": "Grant notifications", "event": [ { "listen": "test", @@ -60041,14 +57271,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro host groups (dependencies)", + "name": "Revoke notifications", "event": [ { "listen": "test", @@ -60099,14 +57329,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke host groups (dependencies)", + "name": "Grant escalations", "event": [ { "listen": "test", @@ -60157,14 +57387,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw services(dependencies)", + "name": "Revoke escalations", "event": [ { "listen": "test", @@ -60215,14 +57445,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro services(dependencies)", + "name": "Grant hosts (dependencies)", "event": [ { "listen": "test", @@ -60273,14 +57503,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services(dependencies)", + "name": "Revoke hosts (dependencies)", "event": [ { "listen": "test", @@ -60331,14 +57561,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw service groups(dependencies)", + "name": "Grant host groups (dependencies)", "event": [ { "listen": "test", @@ -60389,14 +57619,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro service groups(dependencies)", + "name": "Revoke host groups (dependencies)", "event": [ { "listen": "test", @@ -60447,14 +57677,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke service groups(dependencies)", + "name": "Grant services(dependencies)", "event": [ { "listen": "test", @@ -60505,14 +57735,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw meta services (dependencies)", + "name": "Revoke services(dependencies)", "event": [ { "listen": "test", @@ -60563,14 +57793,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro meta services (dependencies)", + "name": "Grant service groups(dependencies)", "event": [ { "listen": "test", @@ -60621,14 +57851,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke meta services (dependencies)", + "name": "Revoke service groups(dependencies)", "event": [ { "listen": "test", @@ -60679,14 +57909,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw SNMP traps (config)", + "name": "Grant meta services (dependencies)", "event": [ { "listen": "test", @@ -60737,14 +57967,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke SNMP traps (config)", + "name": "Revoke meta services (dependencies)", "event": [ { "listen": "test", @@ -60795,14 +58025,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw SNMP traps (SNMP)", + "name": "Grant SNMP traps (config)", "event": [ { "listen": "test", @@ -60853,14 +58083,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;snmp traps\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke SNMP traps (SNMP)", + "name": "Revoke SNMP traps (config)", "event": [ { "listen": "test", @@ -60911,14 +58141,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;snmp traps\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw manufacturer", + "name": "Grant SNMP traps (SNMP)", "event": [ { "listen": "test", @@ -60969,14 +58199,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;manufacturer\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;snmp traps\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke manufacturer", + "name": "Revoke SNMP traps (SNMP)", "event": [ { "listen": "test", @@ -61027,14 +58257,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;manufacturer\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;snmp traps\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw group (SNMP)", + "name": "Grant manufacturer", "event": [ { "listen": "test", @@ -61085,14 +58315,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;group\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;manufacturer\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke group (SNMP)", + "name": "Revoke manufacturer", "event": [ { "listen": "test", @@ -61143,14 +58373,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;group\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;manufacturer\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw mibs", + "name": "Grant group (SNMP)", "event": [ { "listen": "test", @@ -61201,14 +58431,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;mibs\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;group\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke mibs", + "name": "Revoke group (SNMP)", "event": [ { "listen": "test", @@ -61259,14 +58489,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;mibs\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;group\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw generate", + "name": "Grant mibs", "event": [ { "listen": "test", @@ -61317,14 +58547,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;generate\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;mibs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke generate", + "name": "Revoke mibs", "event": [ { "listen": "test", @@ -61375,14 +58605,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;generate\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;mibs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw knowledge base", + "name": "Grant generate", "event": [ { "listen": "test", @@ -61433,14 +58663,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;generate\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke knowledge base", + "name": "Revoke generate", "event": [ { "listen": "test", @@ -61491,14 +58721,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;generate\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw hosts (knowledge)", + "name": "Grant knowledge base", "event": [ { "listen": "test", @@ -61549,14 +58779,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;hosts\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke hosts (knowledge)", + "name": "Revoke knowledge base", "event": [ { "listen": "test", @@ -61607,14 +58837,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;hosts\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw services (knowledge)", + "name": "Grant hosts (knowledge)", "event": [ { "listen": "test", @@ -61665,14 +58895,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;services\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services (knowledge)", + "name": "Revoke hosts (knowledge)", "event": [ { "listen": "test", @@ -61723,14 +58953,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;services\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw host templates (knowledge)", + "name": "Grant services (knowledge)", "event": [ { "listen": "test", @@ -61781,14 +59011,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;host templates\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke host templates (knowledge)", + "name": "Revoke services (knowledge)", "event": [ { "listen": "test", @@ -61839,14 +59069,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;host templates\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw service templates (knowledge)", + "name": "Grant host templates (knowledge)", "event": [ { "listen": "test", @@ -61897,14 +59127,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;service templates\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;host templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke service templates (knowledge)", + "name": "Revoke host templates (knowledge)", "event": [ { "listen": "test", @@ -61955,14 +59185,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;service templates\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;host templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw pollers (config)", + "name": "Grant service templates (knowledge)", "event": [ { "listen": "test", @@ -62013,14 +59243,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;service templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke pollers (config)", + "name": "Revoke service templates (knowledge)", "event": [ { "listen": "test", @@ -62071,14 +59301,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;service templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw export configuration", + "name": "Grant pollers (config)", "event": [ { "listen": "test", @@ -62129,14 +59359,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;export configuration\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke export configuration", + "name": "Revoke pollers (config)", "event": [ { "listen": "test", @@ -62187,14 +59417,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;export configuration\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw pollers (pollers)", + "name": "Grant export configuration", "event": [ { "listen": "test", @@ -62245,14 +59475,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;export configuration\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro pollers (pollers)", + "name": "Revoke export configuration", "event": [ { "listen": "test", @@ -62303,14 +59533,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;export configuration\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke pollers (pollers)", + "name": "Grant pollers (pollers)", "event": [ { "listen": "test", @@ -62361,14 +59591,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantrw engine configuration", + "name": "Revoke pollers (pollers)", "event": [ { "listen": "test", @@ -62419,14 +59649,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grantro engine configuration", + "name": "Grant engine configuration", "event": [ { "listen": "test", @@ -62477,7 +59707,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" }, "description": "" }, @@ -62542,7 +59772,7 @@ "response": [] }, { - "name": "Grantrw broker configuration", + "name": "Grant broker configuration", "event": [ { "listen": "test", @@ -62593,7 +59823,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration\"\n}" }, "description": "" }, @@ -62658,7 +59888,7 @@ "response": [] }, { - "name": "Grantrw wizard", + "name": "Grant wizard", "event": [ { "listen": "test", @@ -62709,7 +59939,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizard\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizard\"\n}" }, "description": "" }, @@ -62774,7 +60004,7 @@ "response": [] }, { - "name": "Grantrw wizardajax", + "name": "Grant wizardajax", "event": [ { "listen": "test", @@ -62825,7 +60055,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizardajax\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizardajax\"\n}" }, "description": "" }, @@ -62890,7 +60120,7 @@ "response": [] }, { - "name": "Grantrw resources", + "name": "Grant resources", "event": [ { "listen": "test", @@ -62941,7 +60171,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;resources\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;resources\"\n}" }, "description": "" }, @@ -63006,7 +60236,7 @@ "response": [] }, { - "name": "Grantrw administration", + "name": "Grant administration", "event": [ { "listen": "test", @@ -63057,7 +60287,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration\"\n}" }, "description": "" }, @@ -63122,7 +60352,7 @@ "response": [] }, { - "name": "Grantrw parameters", + "name": "Grant parameters", "event": [ { "listen": "test", @@ -63173,7 +60403,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters\"\n}" }, "description": "" }, @@ -63238,7 +60468,7 @@ "response": [] }, { - "name": "Grantrw centreon UI", + "name": "Grant centreon UI", "event": [ { "listen": "test", @@ -63289,7 +60519,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centreon UI\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centreon UI\"\n}" }, "description": "" }, @@ -63354,7 +60584,7 @@ "response": [] }, { - "name": "Grantrw monitoring (parameters)", + "name": "Grant monitoring (parameters)", "event": [ { "listen": "test", @@ -63405,7 +60635,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;monitoring\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;monitoring\"\n}" }, "description": "" }, @@ -63470,7 +60700,7 @@ "response": [] }, { - "name": "Grantrw centcore", + "name": "Grant centcore", "event": [ { "listen": "test", @@ -63521,7 +60751,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centcore\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centcore\"\n}" }, "description": "" }, @@ -63586,7 +60816,7 @@ "response": [] }, { - "name": "Grantrw my account", + "name": "Grant my account", "event": [ { "listen": "test", @@ -63637,7 +60867,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;my account\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;my account\"\n}" }, "description": "" }, @@ -63702,7 +60932,7 @@ "response": [] }, { - "name": "Grantrw LDAP", + "name": "Grant LDAP", "event": [ { "listen": "test", @@ -63753,7 +60983,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;LDAP\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;LDAP\"\n}" }, "description": "" }, @@ -63818,7 +61048,7 @@ "response": [] }, { - "name": "Grantrw RRDtool", + "name": "Grant RRDtool", "event": [ { "listen": "test", @@ -63869,7 +61099,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;RRDtool\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;RRDtool\"\n}" }, "description": "" }, @@ -63934,7 +61164,7 @@ "response": [] }, { - "name": "Grantrw debug", + "name": "Grant debug", "event": [ { "listen": "test", @@ -63985,7 +61215,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;debug\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;debug\"\n}" }, "description": "" }, @@ -64050,7 +61280,7 @@ "response": [] }, { - "name": "Grantrw knowledge base (parameters)", + "name": "Grant knowledge base (parameters)", "event": [ { "listen": "test", @@ -64101,7 +61331,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;knowledge base\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;knowledge base\"\n}" }, "description": "" }, @@ -64166,7 +61396,7 @@ "response": [] }, { - "name": "Grantrw CSS", + "name": "Grant CSS", "event": [ { "listen": "test", @@ -64217,7 +61447,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;CSS\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;CSS\"\n}" }, "description": "" }, @@ -64282,7 +61512,7 @@ "response": [] }, { - "name": "Grantrw backup", + "name": "Grant backup", "event": [ { "listen": "test", @@ -64333,7 +61563,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;backup\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;backup\"\n}" }, "description": "" }, @@ -64398,7 +61628,7 @@ "response": [] }, { - "name": "Grantrw options", + "name": "Grant options", "event": [ { "listen": "test", @@ -64449,7 +61679,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;options\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;options\"\n}" }, "description": "" }, @@ -64514,7 +61744,7 @@ "response": [] }, { - "name": "Grantrw data", + "name": "Grant data", "event": [ { "listen": "test", @@ -64565,7 +61795,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;data\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;data\"\n}" }, "description": "" }, @@ -64630,7 +61860,7 @@ "response": [] }, { - "name": "Grantrw images", + "name": "Grant images", "event": [ { "listen": "test", @@ -64681,7 +61911,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;images\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;images\"\n}" }, "description": "" }, @@ -64746,7 +61976,7 @@ "response": [] }, { - "name": "Grantrw extensions", + "name": "Grant extensions", "event": [ { "listen": "test", @@ -64797,7 +62027,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions\"\n}" }, "description": "" }, @@ -64862,7 +62092,7 @@ "response": [] }, { - "name": "Grantrw modules", + "name": "Grant modules", "event": [ { "listen": "test", @@ -64913,7 +62143,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;modules\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;modules\"\n}" }, "description": "" }, @@ -64978,7 +62208,7 @@ "response": [] }, { - "name": "Grantrw widgets", + "name": "Grant widgets", "event": [ { "listen": "test", @@ -65029,7 +62259,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;widgets\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;widgets\"\n}" }, "description": "" }, @@ -65094,7 +62324,7 @@ "response": [] }, { - "name": "Grantrw ACL", + "name": "Grant ACL", "event": [ { "listen": "test", @@ -65145,7 +62375,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL\"\n}" }, "description": "" }, @@ -65210,7 +62440,7 @@ "response": [] }, { - "name": "Grantrw access groups", + "name": "Grant access groups", "event": [ { "listen": "test", @@ -65261,7 +62491,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;access groups\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;access groups\"\n}" }, "description": "" }, @@ -65326,7 +62556,7 @@ "response": [] }, { - "name": "Grantrw menus access", + "name": "Grant menus access", "event": [ { "listen": "test", @@ -65377,7 +62607,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;menus access\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;menus access\"\n}" }, "description": "" }, @@ -65442,7 +62672,7 @@ "response": [] }, { - "name": "Grantrw resources access", + "name": "Grant resources access", "event": [ { "listen": "test", @@ -65493,7 +62723,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;resources access\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;resources access\"\n}" }, "description": "" }, @@ -65558,7 +62788,7 @@ "response": [] }, { - "name": "Grantrw actions access", + "name": "Grant actions access", "event": [ { "listen": "test", @@ -65609,7 +62839,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;actions access\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;actions access\"\n}" }, "description": "" }, @@ -65674,7 +62904,7 @@ "response": [] }, { - "name": "Grantrw reload ACL", + "name": "Grant reload ACL", "event": [ { "listen": "test", @@ -65725,7 +62955,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;reload ACL\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;reload ACL\"\n}" }, "description": "" }, @@ -65790,7 +63020,7 @@ "response": [] }, { - "name": "Grantrw logs", + "name": "Grant logs", "event": [ { "listen": "test", @@ -65841,7 +63071,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs\"\n}" }, "description": "" }, @@ -65906,7 +63136,7 @@ "response": [] }, { - "name": "Grantrw visualisation", + "name": "Grant visualisation", "event": [ { "listen": "test", @@ -65957,7 +63187,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs;visualisation\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs;visualisation\"\n}" }, "description": "" }, @@ -66022,7 +63252,7 @@ "response": [] }, { - "name": "Grantrw sessions", + "name": "Grant sessions", "event": [ { "listen": "test", @@ -66073,7 +63303,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;sessions\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;sessions\"\n}" }, "description": "" }, @@ -66138,7 +63368,7 @@ "response": [] }, { - "name": "Grantrw server status", + "name": "Grant server status", "event": [ { "listen": "test", @@ -66189,7 +63419,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status\"\n}" }, "description": "" }, @@ -66254,7 +63484,7 @@ "response": [] }, { - "name": "Grantrw databases", + "name": "Grant databases", "event": [ { "listen": "test", @@ -66305,7 +63535,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status;databases\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status;databases\"\n}" }, "description": "" }, @@ -66370,7 +63600,7 @@ "response": [] }, { - "name": "Grantrw about (admin)", + "name": "Grant about (admin)", "event": [ { "listen": "test", @@ -66421,7 +63651,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about\"\n}" }, "description": "" }, @@ -66486,7 +63716,7 @@ "response": [] }, { - "name": "Grantrw about (about)", + "name": "Grant about (about)", "event": [ { "listen": "test", @@ -66537,7 +63767,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about;about\"\n}" + "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about;about\"\n}" }, "description": "" }, @@ -79731,4 +76961,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/tests/rest_api/rest_api.postman_environment.json b/tests/rest_api/rest_api.postman_environment.json index a071d6f5bc0..fbf2f7bcdf4 100644 --- a/tests/rest_api/rest_api.postman_environment.json +++ b/tests/rest_api/rest_api.postman_environment.json @@ -1319,7 +1319,7 @@ { "enabled": true, "key": "gmt_value", - "value": "Europe/Paris", + "value": "2", "type": "text" }, { @@ -3085,76 +3085,10 @@ "key": "mib_path", "value": "/usr/share/centreon/IF-MIB.txt", "type": "text" - }, - { - "enabled": true, - "key": "service_contact_additive_inheritance", - "value": "1", - "type": "text" - }, - { - "enabled": true, - "key": "service_cg_additive_inheritance", - "value": "1", - "type": "text" - }, - { - "enabled": true, - "key": "hgservice_contact_additive_inheritance", - "value": "1", - "type": "text" - }, - { - "enabled": true, - "key": "hgservice_cg_additive_inheritance", - "value": "1", - "type": "text" - }, - { - "enabled": true, - "key": "author", - "value": "admin", - "type": "text" - }, - { - "enabled": true, - "key": "actual_start_time", - "value": "2017/09/04 10:54", - "type": "text" - }, - { - "enabled": true, - "key": "end_time", - "value": "2017/09/04 11:54", - "type": "text" - }, - { - "enabled": true, - "key": "comment_data", - "value": "commentaire", - "type": "text" - }, - { - "enabled": true, - "key": "duration", - "value": "3600", - "type": "text" - }, - { - "enabled": true, - "key": "fixed", - "value": "1", - "type": "text" - }, - { - "enabled": true, - "key": "withservices", - "value": "0", - "type": "text" } ], - "timestamp": 1504515293973, + "timestamp": 1497354245340, "_postman_variable_scope": "environment", - "_postman_exported_at": "2017-09-04T11:25:03.903Z", - "_postman_exported_using": "Postman/5.2.0" + "_postman_exported_at": "2017-06-13T11:49:43.701Z", + "_postman_exported_using": "Postman/5.0.0" } diff --git a/tests/rest_api/rest_api_realtime.postman_collection.json b/tests/rest_api/rest_api_realtime.postman_collection.json new file mode 100644 index 00000000000..bef9e693902 --- /dev/null +++ b/tests/rest_api/rest_api_realtime.postman_collection.json @@ -0,0 +1,3999 @@ +{ + "variables": [], + "info": { + "name": "Centreon Web Rest API realtime", + "_postman_id": "bd51712a-396d-01f9-1a80-da5d92fe9f6a", + "description": "", + "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" + }, + "item": [ + { + "name": "Host", + "description": "", + "item": [ + { + "name": "host list with no parameters", + "description": "", + "item": [ + { + "name": "host list", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "Host list with limit parameter", + "description": "", + "item": [ + { + "name": "Limit", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field id", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=id,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "id,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field name", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit=2&fields=name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "2", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field alias", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=alias,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "alias,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field address", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=address,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "address,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field state", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=state,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "state,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field state_type", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=state_type,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "state_type,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field output", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=output,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "output,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field max_check_attempts", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=max_check_attempts,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "max_check_attempts,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field check_attempt", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=check_attempt,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "check_attempt,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field last_check", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=last_check,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "last_check,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field last_state_change", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=last_state_change,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "last_state_change,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field last_hard_state_change", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=last_hard_state_change,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "last_hard_state_change,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field acknowledged", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=acknowledged,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "acknowledged,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field instance", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&fields=instance,name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "instance,name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Limit with field criticality", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&criticality=", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "criticality", + "value": "", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "Host list with viewType parameter", + "description": "", + "item": [ + { + "name": "list with viewType", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "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, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "all,unhandled,problems", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "with viewType all", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&viewType=all", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "all", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "with viewType unhandled", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&viewType=unhandled", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "unhandled", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "with viewType problems", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&viewType=problems", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "problems", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "viewType with limit", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=all,unhandled,problems", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "all,unhandled,problems", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "viewType all with limit", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=all", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "all", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "viewType unhandled with limit", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=unhandled", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "unhandled", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "viewType problems with limit", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&viewType=problems", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "viewType", + "value": "problems", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "Host list with status filter", + "description": "", + "item": [ + { + "name": "status up with state and name", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=up&fields=name, state", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "up", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "name, state", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "status down with state and name", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=down&fields=name, state", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "down", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "name, state", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "status unreachable with state and name", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=unreachable&fields=name, state", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "unreachable", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "name, state", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "status pending with state and name", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&status=pending&fields=name, state", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "pending", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "name, state", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "status all with limit", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&limit={{my_limit}}&status=all&fields=name, state", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "limit", + "value": "{{my_limit}}", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "all", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "name, state", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + }, + { + "name": "Host list by Host", + "description": "", + "item": [ + { + "name": "search by host name", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with status up", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=up", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "up", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with status down", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=down", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "down", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with status pending", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=pending", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "pending", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with status unreachable", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&status=unreachable", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "status", + "value": "unreachable", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with id field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=id", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "id", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with name field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=name", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "name", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with alias field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=alias", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "alias", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with address field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=address", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "address", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with state field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=state", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "state", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with state_type field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=state_type", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "state_type", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with output field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=output", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "output", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with max_check_attempts field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=max_check_attempts", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "max_check_attempts", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with last_check field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=last_check", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "last_check", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with last_state_change field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=last_state_change", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "last_state_change", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with last_hard_state_change field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=last_hard_state_change", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "last_hard_state_change", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with acknowledged field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=acknowledged", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "acknowledged", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with instance field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=instance", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "instance", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with criticality field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=criticality", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "criticality", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + }, + { + "name": "search by host name with passive_checks field", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "tests['response code is 200'] = responseCode.code === 200;", + "tests['response time is less than 200'] = responseTime < 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_hosts&search={{host_name}}&fields=passive_checks", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_hosts", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "fields", + "value": "passive_checks", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "" + }, + "description": "" + }, + "response": [] + } + ], + "_postman_isSubFolder": true + } + ] + }, + { + "name": "Service", + "description": "", + "item": [ + { + "name": "Service List", + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_services", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": {}, + "description": "" + }, + "response": [] + }, + { + "name": "Service List by host name", + "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, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_services", + "equals": true, + "description": "" + }, + { + "key": "searchHost", + "value": "{{host_name}}", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": {}, + "description": "" + }, + "response": [] + }, + { + "name": "Service List by host name and service name", + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=list&object=centreon_realtime_services&searchHost={{host_name}}&search={{service_description}}", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "list", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_realtime_services", + "equals": true, + "description": "" + }, + { + "key": "searchHost", + "value": "{{host_name}}", + "equals": true, + "description": "" + }, + { + "key": "search", + "value": "{{service_description}}", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "GET", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": {}, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "Authenticate", + "description": "", + "item": [ + { + "name": "Authenticate", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "postman.setEnvironmentVariable(\"token\",jsonData.authToken);" + ] + } + } + ], + "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": "" + } + ], + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "key": "username", + "value": "{{api_user}}", + "description": "", + "type": "text" + }, + { + "key": "password", + "value": "{{api_password}}", + "description": "", + "type": "text" + } + ] + }, + "description": "" + }, + "response": [] + } + ] + } + ] +} \ No newline at end of file diff --git a/www/class/centreon-clapi/centreonRtDowntime.class.php b/www/class/centreon-clapi/centreonRtDowntime.class.php index d70471a13cd..689957f7f12 100644 --- a/www/class/centreon-clapi/centreonRtDowntime.class.php +++ b/www/class/centreon-clapi/centreonRtDowntime.class.php @@ -125,6 +125,8 @@ private function parseParameters($action, $parameters) } } + $withServices = ($withServices == 1) ? true : false; + // Sécurise le commentaire pour qu'il est forcément des guillemets $comment = escapeshellarg($comment); From 295dc28b8a23cfcf77e9e3fc092560addb67f866 Mon Sep 17 00:00:00 2001 From: Kevin Duret Date: Wed, 27 Sep 2017 17:47:57 +0200 Subject: [PATCH 15/16] text(api): get postman collection from another branch --- .../rest_api/rest_api.postman_collection.json | 6402 +++++++++++------ 1 file changed, 4290 insertions(+), 2112 deletions(-) diff --git a/tests/rest_api/rest_api.postman_collection.json b/tests/rest_api/rest_api.postman_collection.json index 8cdb113c48e..edf14d32736 100644 --- a/tests/rest_api/rest_api.postman_collection.json +++ b/tests/rest_api/rest_api.postman_collection.json @@ -1106,23 +1106,40 @@ "script": { "type": "text/javascript", "exec": [ + "tests[\"Status code is 200\"] = responseCode.code === 200;", + "", + "var contentType = postman.getResponseHeader(\"Content-Type\");", + "", + "tests[\"Content-Type is present\"] = contentType !== null;", + "tests[\"Content-Type is application/json\"] = contentType === \"application/json\";", + "", "var jsonData = JSON.parse(responseBody);", "var hostData = jsonData.result;", "", - "try {", - " tests[\"Body contains list of hosts\"] = hostData;", - " var i = 0;", - " while (i < hostData.length) {", - " if (postman.getEnvironmentVariable(\"instance_host\") == hostData[i].name) {", - " break;", - " }", - " i++;", + "tests[\"Body contains entries\"] = hostData.length > 0;", + "", + "var schema = 0;", + "if (hostData[0].id && hostData[0].name && hostData[0].address) {", + " schema = 1;", + "}", + "tests[\"Validate schema\"] = schema == 1;", + "", + "var pattern = /^_Module_/;", + "var hostMetaPresent = false;", + "var hostPresent = false;", + "", + "hostData.forEach(function(host) {", + " if (pattern.test(host.name) === true) {", + " hostMetaPresent = true;", " }", - " tests[\"Body contains added host\"] = postman.getEnvironmentVariable(\"instance_host\") == hostData[i].generic-active-host;", - " tests[\"Body contains added host_address\"] = postman.getEnvironmentVariable(\"host_address\") == hostData[i]['0.0.0.1'];", - "} catch (e) {}", + " ", + " if ((host.name == postman.getEnvironmentVariable(\"host_name2\")) && (host.address == \"0.0.0.0\")) {", + " hostPresent = true;", + " }", + "});", "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" + "tests[\"Configured host present\"] = hostPresent === true;", + "tests[\"No _Module host present\"] = hostMetaPresent === false;" ] } } @@ -19055,6 +19072,64 @@ }, "response": [] }, + { + "name": "Set contact non admin", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;0\"\n}" + }, + "description": "" + }, + "response": [] + }, { "name": "Create contact-2", "event": [ @@ -19118,34 +19193,13 @@ "response": [] }, { - "name": "List contact copy", + "name": "Set contact non admin", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_name\") == contactData[i].name) {", - " tests[\"Body contains added contact_name\"] = postman.getEnvironmentVariable(\"contact_name\") == contactData[i].name;", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].alias;", - " tests[\"Body contains added contact_email\"] = postman.getEnvironmentVariable(\"contact_mail\") == contactData[i].email;", - " tests[\"Body contains added contact_GUI_access\"] = postman.getEnvironmentVariable(\"contact_GUI_access\") == contactData[i]['gui access'];", - " tests[\"Body contains added contact_admin\"] = postman.getEnvironmentVariable(\"contact_admin\") == contactData[i].admin;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_name was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -19194,7 +19248,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"contact\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"contact\",\n \"values\": \"{{contact_alias}};admin;0\"\n}" }, "description": "" }, @@ -33881,7 +33935,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_name}}\"\n}" + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" }, "description": "" }, @@ -33943,7 +33997,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_name}}\"\n}" + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}\"\n}" }, "description": "" }, @@ -34005,7 +34059,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_name}}|{{contact_name2}}\"\n}" + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"stpl\",\n \"values\": \"{{stpl_description}};{{contact_alias}}|{{contact_alias2}}\"\n}" }, "description": "" }, @@ -35427,6 +35481,130 @@ }, "response": [] }, + { + "name": "Setparam contact_additive_inheritance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};contact_additive_inheritance;{{service_contact_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam cg_additive_inheritance", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"service\",\n \"values\": \"{{host_name}};{{service_description}};cg_additive_inheritance;{{service_cg_additive_inheritance}}\"\n}" + }, + "description": "" + }, + "response": [] + }, { "name": "Setparam notifications_enabled", "event": [ @@ -39609,7 +39787,7 @@ "response": [] }, { - "name": "Setparam notifications_enabled", + "name": "Setparam contact_additive_inheritance", "event": [ { "listen": "test", @@ -39622,7 +39800,7 @@ } ], "request": { - "url": { + "url": { "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", "protocol": "http", "host": [ @@ -39662,16 +39840,16 @@ "description": "" } ], - "body": { + "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notifications_enabled;{{hgservice_notifications_enabled}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};contact_additive_inheritance;{{hgservice_contact_additive_inheritance}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam notification_interval", + "name": "Setparam cg_additive_inheritance", "event": [ { "listen": "test", @@ -39726,14 +39904,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_interval;{{hgservice_notif_interval}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};cg_additive_inheritance;{{hgservice_cg_additive_inheritance}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam notification_period", + "name": "Setparam notifications_enabled", "event": [ { "listen": "test", @@ -39788,14 +39966,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_period;{{tp_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notifications_enabled;{{hgservice_notifications_enabled}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam notification_options", + "name": "Setparam notification_interval", "event": [ { "listen": "test", @@ -39850,14 +40028,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_options;{{hgservice_notif_option}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_interval;{{hgservice_notif_interval}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam first_notification_delay", + "name": "Setparam notification_period", "event": [ { "listen": "test", @@ -39912,14 +40090,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};first_notification_delay;{{hgservice_first_notif_delay}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_period;{{tp_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam parallelize_check", + "name": "Setparam notification_options", "event": [ { "listen": "test", @@ -39974,14 +40152,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};parallelize_check;{{hgservice_parallelize_checks}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notification_options;{{hgservice_notif_option}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam obsess_over_service", + "name": "Setparam first_notification_delay", "event": [ { "listen": "test", @@ -40036,14 +40214,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};obsess_over_service;{{hgservice_obsess_over_service}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};first_notification_delay;{{hgservice_first_notif_delay}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam check_freshness", + "name": "Setparam parallelize_check", "event": [ { "listen": "test", @@ -40098,14 +40276,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_freshness;{{hgservice_check_freshness}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};parallelize_check;{{hgservice_parallelize_checks}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam freshness_threshold", + "name": "Setparam obsess_over_service", "event": [ { "listen": "test", @@ -40160,14 +40338,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};freshness_threshold;{{hgservice_freshness_threshold}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};obsess_over_service;{{hgservice_obsess_over_service}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam event_handler_enabled", + "name": "Setparam check_freshness", "event": [ { "listen": "test", @@ -40222,14 +40400,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_enabled;{{hgservice_event_handler_enabled}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};check_freshness;{{hgservice_check_freshness}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam flap_detection_enabled", + "name": "Setparam freshness_threshold", "event": [ { "listen": "test", @@ -40284,14 +40462,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};flap_detection_enabled;{{hgservice_flap_detection_enabled}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};freshness_threshold;{{hgservice_freshness_threshold}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam process_perf_data", + "name": "Setparam event_handler_enabled", "event": [ { "listen": "test", @@ -40346,14 +40524,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};process_perf_data;{{hgservice_process_perf_data}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_enabled;{{hgservice_event_handler_enabled}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam retain_status_informations", + "name": "Setparam flap_detection_enabled", "event": [ { "listen": "test", @@ -40408,14 +40586,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_status_information;{{hgservice_retain_status_info}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};flap_detection_enabled;{{hgservice_flap_detection_enabled}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam retain_nonstatus_informations", + "name": "Setparam process_perf_data", "event": [ { "listen": "test", @@ -40470,14 +40648,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_nonstatus_information;{{hgservice_retain_nonstatus_info}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};process_perf_data;{{hgservice_process_perf_data}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam event_handler", + "name": "Setparam retain_status_informations", "event": [ { "listen": "test", @@ -40532,14 +40710,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler;{{command_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_status_information;{{hgservice_retain_status_info}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam event_handler_arguments", + "name": "Setparam retain_nonstatus_informations", "event": [ { "listen": "test", @@ -40594,14 +40772,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_arguments;{{hgservice_event_handler_arg}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};retain_nonstatus_information;{{hgservice_retain_nonstatus_info}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam notes", + "name": "Setparam event_handler", "event": [ { "listen": "test", @@ -40656,14 +40834,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes;{{hgservice_notes}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler;{{command_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam notes_url", + "name": "Setparam event_handler_arguments", "event": [ { "listen": "test", @@ -40718,14 +40896,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes_url;{{hgservice_notes_url}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};event_handler_arguments;{{hgservice_event_handler_arg}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam action_url", + "name": "Setparam notes", "event": [ { "listen": "test", @@ -40780,14 +40958,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};action_url;{{hgservice_action_url}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes;{{hgservice_notes}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam icon_image", + "name": "Setparam notes_url", "event": [ { "listen": "test", @@ -40842,14 +41020,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image;{{hgservice_icon_image}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};notes_url;{{hgservice_notes_url}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam icon_image_alt", + "name": "Setparam action_url", "event": [ { "listen": "test", @@ -40904,14 +41082,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image_alt;{{hgservice_icon_image_alt}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};action_url;{{hgservice_action_url}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam comment", + "name": "Setparam icon_image", "event": [ { "listen": "test", @@ -40966,14 +41144,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};comment;{{hgservice_comment}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image;{{hgservice_icon_image}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam service_notif_options", + "name": "Setparam icon_image_alt", "event": [ { "listen": "test", @@ -41028,47 +41206,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};service_notification_options;{{hg_notif_option}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};icon_image_alt;{{hgservice_icon_image_alt}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "List service", + "name": "Setparam comment", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var serviceData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of host group services\"] = serviceData;", - " var i = 0;", - " while (i < serviceData.length) {", - " if (postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description)", - " {", - " tests[\"Body contains added hgservice\"] = postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description;", - " tests[\"Body contains added hgservice_hg\"] = postman.getEnvironmentVariable(\"hg_name\") == serviceData[i]['hg name'];", - " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == serviceData[i]['check command'];", - " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == serviceData[i]['check command arg'];", - " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"hgservice_normal_check_interval\") == serviceData[i]['normal check interval'];", - " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"hgservice_retry_check_interval\") == serviceData[i]['retry check interval'];", - " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"hgservice_max_check_attempts\") == serviceData[i]['max check attempts'];", - " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_active_check_enabled\") == serviceData[i]['active checks enabled'];", - " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_passive_check_enabled\") == serviceData[i]['passive checks enabled'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"hgservice_description was found\"] = false;", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -41117,14 +41268,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"hgservice\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};comment;{{hgservice_comment}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Create hg-2", + "name": "Setparam service_notif_options", "event": [ { "listen": "test", @@ -41179,20 +41330,47 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name2}};{{hg_name2}};0.0.0.0;;central;\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};service_notification_options;{{hg_notif_option}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addhostgroup", + "name": "List service", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of host group services\"] = serviceData;", + " var i = 0;", + " while (i < serviceData.length) {", + " if (postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description)", + " {", + " tests[\"Body contains added hgservice\"] = postman.getEnvironmentVariable(\"hgservice_description\") == serviceData[i].description;", + " tests[\"Body contains added hgservice_hg\"] = postman.getEnvironmentVariable(\"hg_name\") == serviceData[i]['hg name'];", + " tests[\"Body contains added command_name\"] = postman.getEnvironmentVariable(\"command_name\") == serviceData[i]['check command'];", + " tests[\"Body contains added comment argument\"] = postman.getEnvironmentVariable(\"command_argument\") == serviceData[i]['check command arg'];", + " tests[\"Body contains added normal check interval\"] = postman.getEnvironmentVariable(\"hgservice_normal_check_interval\") == serviceData[i]['normal check interval'];", + " tests[\"Body contains added retry check interval\"] = postman.getEnvironmentVariable(\"hgservice_retry_check_interval\") == serviceData[i]['retry check interval'];", + " tests[\"Body contains added max check attempts\"] = postman.getEnvironmentVariable(\"hgservice_max_check_attempts\") == serviceData[i]['max check attempts'];", + " tests[\"Body contains added active checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_active_check_enabled\") == serviceData[i]['active checks enabled'];", + " tests[\"Body contains added passive checks enabled\"] = postman.getEnvironmentVariable(\"hgservice_passive_check_enabled\") == serviceData[i]['passive checks enabled'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"hgservice_description was found\"] = false;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -41241,14 +41419,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" + "raw": "{\n \"action\": \"show\",\n \"object\": \"hgservice\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delhostgroup", + "name": "Create hg-2", "event": [ { "listen": "test", @@ -41303,14 +41481,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"hg\",\n \"values\": \"{{hg_name2}};{{hg_name2}};0.0.0.0;;central;\"\n}" }, "description": "" }, "response": [] }, { - "name": "Sethostgroup-2", + "name": "Addhostgroup", "event": [ { "listen": "test", @@ -41365,14 +41543,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" + "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Sethostgroup", + "name": "Delhostgroup", "event": [ { "listen": "test", @@ -41427,14 +41605,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name2}};{{hgservice_description}};{{hg_name}}\"\n}" + "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setmacro", + "name": "Sethostgroup-2", "event": [ { "listen": "test", @@ -41489,41 +41667,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hgservice_macro_name}};{{hgservice_macro_value}}\"\n}" + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hg_name2}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getmacro", + "name": "Sethostgroup", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var macroData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of macros\"] = macroData;", - " var i = 0;", - " var macro_name = \"$_SERVICE\" + postman.getEnvironmentVariable(\"hgservice_macro_name\") + \"$\";", - " while (i < macroData.length) {", - " if (macro_name == macroData[i]['macro name'])", - " {", - " tests[\"Body contains added macro_name\"] = macro_name == macroData[i]['macro name'];", - " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"hgservice_macro_value\") == macroData[i]['macro value'];", - " break;", - " }", - " i++;", - " }", - " if (i == macroData.length)", - " tests[\"hgservice_macro_name was found\"] = false;", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -41572,14 +41729,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name2}};{{hgservice_description}};{{hg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addcontact", + "name": "Setmacro", "event": [ { "listen": "test", @@ -41634,20 +41791,41 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" + "raw": "{\n \"action\": \"setmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hgservice_macro_name}};{{hgservice_macro_value}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delcontact", + "name": "Getmacro", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var macroData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of macros\"] = macroData;", + " var i = 0;", + " var macro_name = \"$_SERVICE\" + postman.getEnvironmentVariable(\"hgservice_macro_name\") + \"$\";", + " while (i < macroData.length) {", + " if (macro_name == macroData[i]['macro name'])", + " {", + " tests[\"Body contains added macro_name\"] = macro_name == macroData[i]['macro name'];", + " tests[\"Body contains added macro_value\"] = postman.getEnvironmentVariable(\"hgservice_macro_value\") == macroData[i]['macro value'];", + " break;", + " }", + " i++;", + " }", + " if (i == macroData.length)", + " tests[\"hgservice_macro_name was found\"] = false;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -41696,14 +41874,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" + "raw": "{\n \"action\": \"getmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setcontact", + "name": "Delmacro", "event": [ { "listen": "test", @@ -41758,39 +41936,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" + "raw": "{\n \"action\": \"delmacro\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{hgservice_macro_name}};{{hgservice_macro_value}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getcontact", + "name": "Addcontact", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of conctacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", - " {", - " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"contact_alias was found\"] = false;", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -41839,14 +41998,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addcontactgroup", + "name": "Delcontact", "event": [ { "listen": "test", @@ -41901,14 +42060,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delcontactgroup", + "name": "Setcontact", "event": [ { "listen": "test", @@ -41963,20 +42122,39 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{contact_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setcontactgroup", + "name": "Getcontact", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var contactData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of conctacts\"] = contactData;", + " var i = 0;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name)", + " {", + " tests[\"Body contains added contact_alias\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == contactData.length)", + " tests[\"contact_alias was found\"] = false;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -42025,39 +42203,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" + "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getcontactgroup", + "name": "Setseverity", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name)", - " {", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -42106,20 +42265,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + "raw": "{\n \"action\": \"setseverity\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{sc_name}}\"\n}" }, "description": "" }, "response": [] - } - ] - }, - { - "name": "43-Servicegroups", - "description": "Tests all commands to manage service groups.", - "item": [ + }, { - "name": "Add service group", + "name": "Unsetseverity", "event": [ { "listen": "test", @@ -42146,11 +42299,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -42158,26 +42315,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"sg\",\n \"values\": \"sg_test;alias_test\"\n}" + "raw": "{\n \"action\": \"unsetseverity\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam name", + "name": "Addcontactgroup", "event": [ { "listen": "test", @@ -42204,11 +42361,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -42216,26 +42377,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"sg_test;name;{{sg_name}}\"\n}" + "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam activate", + "name": "Delcontactgroup", "event": [ { "listen": "test", @@ -42262,11 +42423,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -42274,26 +42439,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};activate;{{sg_activate}}\"\n}" + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam alias", + "name": "Setcontactgroup", "event": [ { "listen": "test", @@ -42320,11 +42485,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -42332,26 +42501,113 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};alias;{{sg_alias}}\"\n}" + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}};{{cg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam comment", + "name": "Getcontactgroup", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name)", + " {", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"hgservice\",\n \"values\": \"{{hg_name}};{{hgservice_description}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "43-Servicegroups", + "description": "Tests all commands to manage service groups.", + "item": [ + { + "name": "Add service group", "event": [ { "listen": "test", @@ -42402,40 +42658,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};comment;{{sg_comment}}\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"sg\",\n \"values\": \"sg_test;alias_test\"\n}" }, "description": "" }, "response": [] }, { - "name": "List service group", + "name": "Setparam name", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var sgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of service groups\"] = sgData;", - " var i = 0;", - " while (i < sgData.length) {", - " if (postman.getEnvironmentVariable(\"sg_name\") == sgData[i].name)", - " {", - " tests[\"Body contains added service group\"] = postman.getEnvironmentVariable(\"sg_name\") == sgData[i].name;", - " tests[\"Body contains added service alias\"] = postman.getEnvironmentVariable(\"sg_alias\") == sgData[i].alias;", - " break;", - " }", - " i++;", - " }", - " if (i == sgData.length)", - " tests[\"sg_name was found\"] = false;", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -42455,14 +42691,10 @@ ], "query": [ { - "description": "", - "equals": true, "key": "action", "value": "action" }, { - "description": "", - "equals": true, "key": "object", "value": "centreon_clapi" } @@ -42484,14 +42716,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"sg\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"sg_test;name;{{sg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addservice", + "name": "Setparam activate", "event": [ { "listen": "test", @@ -42518,15 +42750,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -42534,26 +42762,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};activate;{{sg_activate}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delservice", + "name": "Setparam alias", "event": [ { "listen": "test", @@ -42580,15 +42808,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -42596,26 +42820,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};alias;{{sg_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setservice", + "name": "Setparam comment", "event": [ { "listen": "test", @@ -42642,15 +42866,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -42658,26 +42878,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};comment;{{sg_comment}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getservice", + "name": "List service group", "event": [ { "listen": "test", @@ -42685,22 +42905,290 @@ "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", - "var serviceData = jsonData.result;", + "var sgData = jsonData.result;", "", "try {", - " tests[\"Body contains list of services\"] = serviceData;", + " tests[\"Body contains list of service groups\"] = sgData;", " var i = 0;", - " while (i < serviceData.length) {", - " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'])", + " while (i < sgData.length) {", + " if (postman.getEnvironmentVariable(\"sg_name\") == sgData[i].name)", " {", - " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", - " tests[\"Body contains added service\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'];", + " tests[\"Body contains added service group\"] = postman.getEnvironmentVariable(\"sg_name\") == sgData[i].name;", + " tests[\"Body contains added service alias\"] = postman.getEnvironmentVariable(\"sg_alias\") == sgData[i].alias;", " break;", " }", " i++;", " }", - " if (i == serviceData.length)", - " tests[\"service_description was found\"] = false;", + " if (i == sgData.length)", + " tests[\"sg_name was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"show\",\n \"object\": \"sg\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sg\",\n \"values\": \"{{sg_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getservice", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var serviceData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of services\"] = serviceData;", + " var i = 0;", + " while (i < serviceData.length) {", + " if (postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'])", + " {", + " tests[\"Body contains added host_name\"] = postman.getEnvironmentVariable(\"host_name\") == serviceData[i]['host name'];", + " tests[\"Body contains added service\"] = postman.getEnvironmentVariable(\"service_description\") == serviceData[i]['service description'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"service_description was found\"] = false;", "}", "catch (e) {}", "", @@ -43344,15 +43832,1631 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action", + "equals": true, + "description": "" + }, + { + "key": "object", + "value": "centreon_clapi", + "equals": true, + "description": "" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "description": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setservice", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addservicetemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Getservicetemplate", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var stplData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of stpl_description\"] = stplData;", + " var i = 0;", + " while (i < stplData.length) {", + " if (postman.getEnvironmentVariable(\"stpl_description\") == hgserviceData[i]['service template description']){", + " tests[\"Body contains added stpl_description\"] = postman.getEnvironmentVariable(\"stpl_description\") == stplData[i]['service template description'];", + " break;", + " }", + " i++;", + " }", + " if (i == serviceData.length)", + " tests[\"stpl_description was found\"] = false;", + "}", + "catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"getservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Delservicetemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"delservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setservicetemplate", + "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", + "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": "" + }, + { + "key": "centreon-auth-token", + "value": "{{token}}", + "description": "" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "50-Traps_Vendors", + "description": "Tests all commands to manage vendors.", + "item": [ + { + "name": "Add vendor", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;test_alias\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;name;{{vendor_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam alias", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};alias;{{vendor_alias}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam description", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};description;{{vendor_description}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List vendors", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var vendorData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of vendors\"] = vendorData;", + " var i = 0;", + " while (i < vendorData.length) {", + " if (postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name) {", + " tests[\"Body contains added vendor\"] = postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name;", + " tests[\"Body contains added vendor_alias\"] = postman.getEnvironmentVariable(\"vendor_alias\") == vendorData[i].alias;", + " break;", + " }", + " i++;", + " }", + " if (i == vendorData.length)", + " tests[\"vendor_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"show\",\n \"object\":\"vendor\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Generatetraps", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"generatetraps\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};{{mib_path}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "51-Traps_SNMP", + "description": "Tests all commands to manage traps.", + "item": [ + { + "name": "Setparam comment", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};comments;{{trap_comment}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam output", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};output;{{trap_output}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam oid", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};oid;{{trap_oid}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam status", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};status;{{trap_status}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam vendor", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};vendor;{{trap_vendor}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam matching_mode", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};matching_mode;{{trap_matching_mode}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam reschedule_svc_enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};reschedule_svc_enable;{{trap_reschedule_svc_enable}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam execution_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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command;{{command_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam exec_command_enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command_enable;{{trap_exec_command_enable}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Setparam submit_result_enable", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};submit_result_enable;{{trap_submit_result_enable}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "List traps", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var trapData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of matchings\"] = trapData;", + " var i = 0;", + " while (i < trapData.length) {", + " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name) {", + " tests[\"Body contains added trap\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", + " tests[\"Body contains added trap oid\"] = postman.getEnvironmentVariable(\"trap_oid\") == trapData[i].oid;", + " break;", + " }", + " i++;", + " }", + " if (i == trapData.length)", + " tests[\"trap_name was found\"] = false;", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "request": { + "url": { + "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", + "protocol": "http", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"show\",\n \"object\":\"trap\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addmatching", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"addmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};test_string;test_reg_exp;ok\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Get matching id", + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var matchingData = jsonData.result;", + "", + "try {", + " var i = 0;", + " while (i < matchingData.length) {", + " if (\"test_string\" == matchingData[i].string) {", + " postman.setEnvironmentVariable(\"trap_matching_token\",matchingData[i].id);", + " break;", + " }", + " i++;", + " }", + "} catch (e) {}", + "", + "tests[\"Status code is 200\"] = responseCode.code === 200;" + ] + } + } + ], + "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" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Updatematching name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};string;{{trap_string}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Updatematching order", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -43360,26 +45464,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delservice\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{host_name}},{{service_description}}\"\n}" + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};order;{{trap_matching_order}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addservicetemplate", + "name": "Updatematching status", "event": [ { "listen": "test", @@ -43406,15 +45510,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -43422,50 +45522,32 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};status;{{trap_status_string}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getservicetemplate", + "name": "Updatematching regexp", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var stplData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of stpl_description\"] = stplData;", - " var i = 0;", - " while (i < stplData.length) {", - " if (postman.getEnvironmentVariable(\"stpl_description\") == hgserviceData[i]['service template description']){", - " tests[\"Body contains added stpl_description\"] = postman.getEnvironmentVariable(\"stpl_description\") == stplData[i]['service template description'];", - " break;", - " }", - " i++;", - " }", - " if (i == serviceData.length)", - " tests[\"stpl_description was found\"] = false;", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -43486,15 +45568,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -43502,32 +45580,52 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}}\"\n}" + "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};regexp;{{trap_reg_exp}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delservicetemplate", + "name": "Getmatching", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var matchingData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of matchings\"] = matchingData;", + " var i = 0;", + " while (i < matchingData.length) {", + " if (postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string) {", + " tests[\"Body contains added string\"] = postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string;", + " tests[\"Body contains added regular expression\"] = postman.getEnvironmentVariable(\"trap_reg_exp\") == matchingData[i].regexp;", + " tests[\"Body contains added matching status\"] = postman.getEnvironmentVariable(\"trap_status_string\") == matchingData[i].status;", + " tests[\"Body contains added matching order\"] = postman.getEnvironmentVariable(\"trap_matching_order\") == matchingData[i].order;", + " break;", + " }", + " i++;", + " }", + " if (i == matchingData.length)", + " tests[\"trap_string was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -43547,16 +45645,16 @@ ], "query": [ { - "key": "action", - "value": "action", + "description": "", "equals": true, - "description": "" + "key": "action", + "value": "action" }, { - "key": "object", - "value": "centreon_clapi", + "description": "", "equals": true, - "description": "" + "key": "object", + "value": "centreon_clapi" } ], "variable": [] @@ -43564,32 +45662,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delservicetemplate\",\n \"object\": \"sc\",\n \"values\": \"{{sc_name}};{{stpl_description}}\"\n}" + "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" }, "description": "" }, "response": [] - } - ] - }, - { - "name": "50-Traps_Vendors", - "description": "Tests all commands to manage vendors.", - "item": [ + }, { - "name": "Add vendor", + "name": "Delmatching", "event": [ { "listen": "test", @@ -43640,14 +45732,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;test_alias\"\n}" + "raw": "{\n \"action\": \"delmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}}\"\n}" }, "description": "" }, "response": [] - }, + } + ] + }, + { + "name": "60-Downtimes", + "description": "Tests all commands to manage downtimes.", + "item": [ { - "name": "Setparam name", + "name": "Add downtime", "event": [ { "listen": "test", @@ -43698,14 +45796,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"test_vendor;name;{{vendor_name}}\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;descritpion_test\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam alias", + "name": "Setparam name", "event": [ { "listen": "test", @@ -43756,7 +45854,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};alias;{{vendor_alias}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;name;{{downtime_name}}\"\n}" }, "description": "" }, @@ -43814,14 +45912,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};description;{{vendor_description}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};description;{{downtime_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "List vendors", + "name": "List downtimes", "event": [ { "listen": "test", @@ -43829,22 +45927,23 @@ "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", - "var vendorData = jsonData.result;", + "var downtimeData = jsonData.result;", "", "try {", - " tests[\"Body contains list of vendors\"] = vendorData;", + " tests[\"Body contains list of downtimes\"] = downtimeData;", " var i = 0;", - " while (i < vendorData.length) {", - " if (postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name) {", - " tests[\"Body contains added vendor\"] = postman.getEnvironmentVariable(\"vendor_name\") == vendorData[i].name;", - " tests[\"Body contains added vendor_alias\"] = postman.getEnvironmentVariable(\"vendor_alias\") == vendorData[i].alias;", + " while (i < downtimeData.length) {", + " if (postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name){", + " tests[\"Body contains added downtime_name\"] = postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name;", + " tests[\"Body contains added downtime_description\"] = postman.getEnvironmentVariable(\"downtime_description\") == downtimeData[i].description;", " break;", " }", " i++;", " }", - " if (i == vendorData.length)", - " tests[\"vendor_name was found\"] = false;", - "} catch (e) {}", + " if (i == engineData.length)", + " tests[\"enine_name was found\"] = false;", + "}", + "catch (e) {}", "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] @@ -43865,74 +45964,16 @@ ], "query": [ { - "description": "", - "equals": true, "key": "action", - "value": "action" - }, - { - "description": "", + "value": "action", "equals": true, - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\":\"show\",\n \"object\":\"vendor\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Generatetraps", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -43940,32 +45981,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"generatetraps\",\n \"object\": \"vendor\",\n \"values\": \"{{vendor_name}};{{mib_path}}\"\n}" + "raw": "{\n \"action\": \"show\",\n \"object\": \"downtime\"\n}" }, "description": "" }, "response": [] - } - ] - }, - { - "name": "51-Traps_SNMP", - "description": "Tests all commands to manage traps.", - "item": [ + }, { - "name": "Setparam comment", + "name": "Addweeklyperiod", "event": [ { "listen": "test", @@ -44016,14 +46051,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};comments;{{trap_comment}}\"\n}" + "raw": "{\n \"action\": \"addweeklyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{weekly_start_time}};{{weekly_end_time}};{{weekly_fixed}};{{weekly_duration}};{{weekly_day_of_week}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam output", + "name": "Addmonthlyperiod", "event": [ { "listen": "test", @@ -44074,14 +46109,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};output;{{trap_output}}\"\n}" + "raw": "{\n \"action\": \"addmonthlyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{monthly_start_time}};{{monthly_end_time}};{{monthly_fixed}};{{monthly_duration}};{{monthly_day_of_month}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam oid", + "name": "Addspecificperiod", "event": [ { "listen": "test", @@ -44132,20 +46167,63 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};oid;{{trap_oid}}\"\n}" + "raw": "{\n \"action\": \"addspecificperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{specific_start}};{{specific_end}};{{specific_fixed}};{{specific_duration}};{{specific_day_of_week}};{{specific_month_cycle}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam status", + "name": "List periods", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var downtimeData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of downtimes\"] = downtimeData;", + " var test_start_w = postman.getEnvironmentVariable(\"weekly_start_time\") + ':00';", + " var test_start_m = postman.getEnvironmentVariable(\"monthly_start_time\") + ':00';", + " var test_start_s = postman.getEnvironmentVariable(\"specific_start\") + ':00';", + " for (var i = 0; i < downtimeData.length; i++) {", + " if (test_start_w == downtimeData[i]['start time'])", + " {", + " tests[\"Body contains added weekly_start_time\"] = test_start_w == downtimeData[i]['start time'];", + " var test_end = postman.getEnvironmentVariable(\"weekly_end_time\") + ':00';", + " tests[\"Body contains added weekly_end_time\"] = test_end == downtimeData[i]['end time'];", + " tests[\"Body contains added weekly_fixed\"] = postman.getEnvironmentVariable(\"weekly_fixed\") == downtimeData[i].fixed;", + " if (downtimeData[i].fixed == \"0\")", + " tests[\"Body contains added weekly_duration\"] = postman.getEnvironmentVariable(\"weekly_duration\") == downtimeData[i].duration;", + " tests[\"Body contains added weekly_day_of_week\"] = postman.getEnvironmentVariable(\"weekly_number_days_of_week\") == downtimeData[i]['day of week'];", + " }", + " if (test_start_m == downtimeData[i]['start time'])", + " {", + " tests[\"Body contains added monthly_start_time\"] = test_start_m == downtimeData[1]['start time'];", + " var test_end = postman.getEnvironmentVariable(\"monthly_end_time\") + ':00';", + " tests[\"Body contains added monthly_end_time\"] = test_end == downtimeData[i]['end time'];", + " tests[\"Body contains added monthly_fixed\"] = postman.getEnvironmentVariable(\"monthly_fixed\") == downtimeData[i].fixed;", + " if (downtimeData[i].fixed == \"0\")", + " tests[\"Body contains added monthly_duration\"] = postman.getEnvironmentVariable(\"monthly_duration\") == downtimeData[i].duration;", + " tests[\"Body contains added monthly_day_of_month\"] = postman.getEnvironmentVariable(\"monthly_day_of_month\") == downtimeData[i]['day of month'];", + " }", + " if (test_start_s == downtimeData[i]['start time'])", + " {", + " tests[\"Body contains added specific_start_time\"] = test_start_s == downtimeData[i]['start time'];", + " var test_end = postman.getEnvironmentVariable(\"specific_end\") + ':00';", + " tests[\"Body contains added specific_end_time\"] = test_end == downtimeData[i]['end time'];", + " tests[\"Body contains added specific_fixed\"] = postman.getEnvironmentVariable(\"specific_fixed\") == downtimeData[i].fixed;", + " if (downtimeData[i].fixed == \"0\")", + " tests[\"Body contains added specific_duration\"] = postman.getEnvironmentVariable(\"specific_duration\") == downtimeData[i].duration;", + " tests[\"Body contains added specific_day_of_week\"] = postman.getEnvironmentVariable(\"specific_number_day_of_week\") == downtimeData[i]['day of week'];", + " }", + " }", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -44190,14 +46268,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};status;{{trap_status}}\"\n}" + "raw": "{\n \"action\": \"listperiods\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam vendor", + "name": "Addhost", "event": [ { "listen": "test", @@ -44224,11 +46302,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -44236,26 +46318,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};vendor;{{trap_vendor}}\"\n}" + "raw": "{\n \"action\": \"addhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam matching_mode", + "name": "Delhost", "event": [ { "listen": "test", @@ -44282,11 +46364,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -44294,26 +46380,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};matching_mode;{{trap_matching_mode}}\"\n}" + "raw": "{\n \"action\": \"delhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam reschedule_svc_enable", + "name": "Sethost", "event": [ { "listen": "test", @@ -44340,11 +46426,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -44352,26 +46442,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};reschedule_svc_enable;{{trap_reschedule_svc_enable}}\"\n}" + "raw": "{\n \"action\": \"sethost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam execution_command", + "name": "Addhostgroup", "event": [ { "listen": "test", @@ -44398,11 +46488,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -44410,26 +46504,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command;{{command_name}}\"\n}" + "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam exec_command_enable", + "name": "Delhostgroup", "event": [ { "listen": "test", @@ -44456,11 +46550,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -44468,26 +46566,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};execution_command_enable;{{trap_exec_command_enable}}\"\n}" + "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam submit_result_enable", + "name": "Sethostgroup", "event": [ { "listen": "test", @@ -44514,91 +46612,15 @@ "query": [ { "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};submit_result_enable;{{trap_submit_result_enable}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "List traps", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var trapData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of matchings\"] = trapData;", - " var i = 0;", - " while (i < trapData.length) {", - " if (postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name) {", - " tests[\"Body contains added trap\"] = postman.getEnvironmentVariable(\"trap_name\") == trapData[i].name;", - " tests[\"Body contains added trap oid\"] = postman.getEnvironmentVariable(\"trap_oid\") == trapData[i].oid;", - " break;", - " }", - " i++;", - " }", - " if (i == trapData.length)", - " tests[\"trap_name was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", + "value": "action", "equals": true, - "key": "action", - "value": "action" + "description": "" }, { - "description": "", - "equals": true, "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -44606,26 +46628,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\":\"show\",\n \"object\":\"trap\"\n}" + "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addmatching", + "name": "Addservice", "event": [ { "listen": "test", @@ -44652,11 +46674,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -44664,46 +46690,32 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_name}};test_string;test_reg_exp;ok\"\n}" + "raw": "{\n \"action\": \"addservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Get matching id", + "name": "Delservice", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var matchingData = jsonData.result;", - "", - "try {", - " var i = 0;", - " while (i < matchingData.length) {", - " if (\"test_string\" == matchingData[i].string) {", - " postman.setEnvironmentVariable(\"trap_matching_token\",matchingData[i].id);", - " break;", - " }", - " i++;", - " }", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -44724,11 +46736,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -44736,26 +46752,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" + "raw": "{\n \"action\": \"delservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Updatematching name", + "name": "Setservice", "event": [ { "listen": "test", @@ -44782,11 +46798,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -44794,26 +46814,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};string;{{trap_string}}\"\n}" + "raw": "{\n \"action\": \"setservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Updatematching order", + "name": "Addservicegroup", "event": [ { "listen": "test", @@ -44840,11 +46860,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -44852,26 +46876,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};order;{{trap_matching_order}}\"\n}" + "raw": "{\n \"action\": \"addservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Updatematching status", + "name": "Delservicegroup", "event": [ { "listen": "test", @@ -44898,11 +46922,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -44910,26 +46938,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};status;{{trap_status_string}}\"\n}" + "raw": "{\n \"action\": \"delservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Updatematching regexp", + "name": "Setservicegroup", "event": [ { "listen": "test", @@ -44956,93 +46984,15 @@ "query": [ { "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"updatematching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}};regexp;{{trap_reg_exp}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Getmatching", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var matchingData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of matchings\"] = matchingData;", - " var i = 0;", - " while (i < matchingData.length) {", - " if (postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string) {", - " tests[\"Body contains added string\"] = postman.getEnvironmentVariable(\"trap_string\") == matchingData[i].string;", - " tests[\"Body contains added regular expression\"] = postman.getEnvironmentVariable(\"trap_reg_exp\") == matchingData[i].regexp;", - " tests[\"Body contains added matching status\"] = postman.getEnvironmentVariable(\"trap_status_string\") == matchingData[i].status;", - " tests[\"Body contains added matching order\"] = postman.getEnvironmentVariable(\"trap_matching_order\") == matchingData[i].order;", - " break;", - " }", - " i++;", - " }", - " if (i == matchingData.length)", - " tests[\"trap_string was found\"] = false;", - "} catch (e) {}", - "", - "tests[\"Status code is 200\"] = responseCode.code === 200;" - ] - } - } - ], - "request": { - "url": { - "raw": "http://{{url}}/centreon/api/index.php?action=action&object=centreon_clapi", - "protocol": "http", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "description": "", + "value": "action", "equals": true, - "key": "action", - "value": "action" + "description": "" }, { - "description": "", - "equals": true, "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -45050,26 +47000,32 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\":\"getmatching\",\n \"object\":\"trap\",\n \"values\": \"{{trap_name}}\"\n}" + "raw": "{\n \"action\": \"setservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" }, "description": "" }, "response": [] - }, + } + ] + }, + { + "name": "61-Dependencies", + "description": "Tests all commands to manage dependencies.", + "item": [ { - "name": "Delmatching", + "name": "Add dependency", "event": [ { "listen": "test", @@ -45096,11 +47052,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -45108,32 +47068,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delmatching\",\n \"object\": \"trap\",\n \"values\": \"{{trap_matching_token}}\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"dep\",\n \"values\": \"dep_test;test_description;{{dep_type}};{{host_name}}\"\n}" }, "description": "" }, "response": [] - } - ] - }, - { - "name": "60-Downtimes", - "description": "Tests all commands to manage downtimes.", - "item": [ + }, { - "name": "Add downtime", + "name": "Setparam name", "event": [ { "listen": "test", @@ -45184,14 +47138,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;descritpion_test\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"dep_test;name;{{dep_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam name", + "name": "Setparam description", "event": [ { "listen": "test", @@ -45242,14 +47196,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"downtime_test;name;{{downtime_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};description;{{dep_description}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam description", + "name": "Setparam comment", "event": [ { "listen": "test", @@ -45300,39 +47254,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};description;{{downtime_description}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};comment;{{dep_comment}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "List downtimes", + "name": "Setparam inherits_parent", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var downtimeData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of downtimes\"] = downtimeData;", - " var i = 0;", - " while (i < downtimeData.length) {", - " if (postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name){", - " tests[\"Body contains added downtime_name\"] = postman.getEnvironmentVariable(\"downtime_name\") == downtimeData[i].name;", - " tests[\"Body contains added downtime_description\"] = postman.getEnvironmentVariable(\"downtime_description\") == downtimeData[i].description;", - " break;", - " }", - " i++;", - " }", - " if (i == engineData.length)", - " tests[\"enine_name was found\"] = false;", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -45353,15 +47288,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -45369,26 +47300,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"downtime\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};inherits_parent;{{dep_inherits_parent}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addweeklyperiod", + "name": "Setparam exec_fail_criteria", "event": [ { "listen": "test", @@ -45439,14 +47370,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addweeklyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{weekly_start_time}};{{weekly_end_time}};{{weekly_fixed}};{{weekly_duration}};{{weekly_day_of_week}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};execution_failure_criteria;{{dep_exec_fail_crit}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addmonthlyperiod", + "name": "Setparam notif_fail_criteria", "event": [ { "listen": "test", @@ -45497,20 +47428,43 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addmonthlyperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{monthly_start_time}};{{monthly_end_time}};{{monthly_fixed}};{{monthly_duration}};{{monthly_day_of_month}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};notification_failure_criteria;{{dep_notif_fail_crit}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addspecificperiod", + "name": "List dependencies", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var depData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of dependencies\"] = depData;", + " var i = 0;", + " while (i < depData.length) {", + " if (postman.getEnvironmentVariable(\"dep_name\") == depData[i].name)", + " {", + " tests[\"Body contains added dep_name\"] = postman.getEnvironmentVariable(\"dep_name\") == depData[i].name;", + " tests[\"Body contains added dep_description\"] = postman.getEnvironmentVariable(\"dep_description\") == depData[i].description;", + " tests[\"Body contains added dep_inherits_parents\"] = postman.getEnvironmentVariable(\"dep_inherits_parent\") == depData[i].inherits_parent;", + " tests[\"Body contains added dep_execution_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_exec_fail_crit\") == depData[i].execution_failure_criteria;", + " tests[\"Body contains added dep_notification_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_notif_fail_crit\") == depData[i].notification_failure_criteria;", + " break;", + " }", + " i++;", + " }", + " if (i == depData.length)", + " tests[\"dep_name was found\"] = false;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -45530,10 +47484,14 @@ ], "query": [ { + "description": "", + "equals": true, "key": "action", "value": "action" }, { + "description": "", + "equals": true, "key": "object", "value": "centreon_clapi" } @@ -45555,63 +47513,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addspecificperiod\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{specific_start}};{{specific_end}};{{specific_fixed}};{{specific_duration}};{{specific_day_of_week}};{{specific_month_cycle}}\"\n}" + "raw": "{\n \"action\": \"show\",\n \"object\": \"dep\"\n}" }, "description": "" }, "response": [] }, { - "name": "List periods", + "name": "Addparent", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var downtimeData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of downtimes\"] = downtimeData;", - " var test_start_w = postman.getEnvironmentVariable(\"weekly_start_time\") + ':00';", - " var test_start_m = postman.getEnvironmentVariable(\"monthly_start_time\") + ':00';", - " var test_start_s = postman.getEnvironmentVariable(\"specific_start\") + ':00';", - " for (var i = 0; i < downtimeData.length; i++) {", - " if (test_start_w == downtimeData[i]['start time'])", - " {", - " tests[\"Body contains added weekly_start_time\"] = test_start_w == downtimeData[i]['start time'];", - " var test_end = postman.getEnvironmentVariable(\"weekly_end_time\") + ':00';", - " tests[\"Body contains added weekly_end_time\"] = test_end == downtimeData[i]['end time'];", - " tests[\"Body contains added weekly_fixed\"] = postman.getEnvironmentVariable(\"weekly_fixed\") == downtimeData[i].fixed;", - " if (downtimeData[i].fixed == \"0\")", - " tests[\"Body contains added weekly_duration\"] = postman.getEnvironmentVariable(\"weekly_duration\") == downtimeData[i].duration;", - " tests[\"Body contains added weekly_day_of_week\"] = postman.getEnvironmentVariable(\"weekly_number_days_of_week\") == downtimeData[i]['day of week'];", - " }", - " if (test_start_m == downtimeData[i]['start time'])", - " {", - " tests[\"Body contains added monthly_start_time\"] = test_start_m == downtimeData[1]['start time'];", - " var test_end = postman.getEnvironmentVariable(\"monthly_end_time\") + ':00';", - " tests[\"Body contains added monthly_end_time\"] = test_end == downtimeData[i]['end time'];", - " tests[\"Body contains added monthly_fixed\"] = postman.getEnvironmentVariable(\"monthly_fixed\") == downtimeData[i].fixed;", - " if (downtimeData[i].fixed == \"0\")", - " tests[\"Body contains added monthly_duration\"] = postman.getEnvironmentVariable(\"monthly_duration\") == downtimeData[i].duration;", - " tests[\"Body contains added monthly_day_of_month\"] = postman.getEnvironmentVariable(\"monthly_day_of_month\") == downtimeData[i]['day of month'];", - " }", - " if (test_start_s == downtimeData[i]['start time'])", - " {", - " tests[\"Body contains added specific_start_time\"] = test_start_s == downtimeData[i]['start time'];", - " var test_end = postman.getEnvironmentVariable(\"specific_end\") + ':00';", - " tests[\"Body contains added specific_end_time\"] = test_end == downtimeData[i]['end time'];", - " tests[\"Body contains added specific_fixed\"] = postman.getEnvironmentVariable(\"specific_fixed\") == downtimeData[i].fixed;", - " if (downtimeData[i].fixed == \"0\")", - " tests[\"Body contains added specific_duration\"] = postman.getEnvironmentVariable(\"specific_duration\") == downtimeData[i].duration;", - " tests[\"Body contains added specific_day_of_week\"] = postman.getEnvironmentVariable(\"specific_number_day_of_week\") == downtimeData[i]['day of week'];", - " }", - " }", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -45632,11 +47547,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -45644,26 +47563,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"listperiods\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}}\"\n}" + "raw": "{\n \"action\": \"addparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addhost", + "name": "Create host3", "event": [ { "listen": "test", @@ -45718,14 +47637,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name3}};{{host_name3}};0.0.0.0;;central;\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delhost", + "name": "Addchild", "event": [ { "listen": "test", @@ -45780,14 +47699,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delhost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" + "raw": "{\n \"action\": \"addchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Sethost", + "name": "Delparent", "event": [ { "listen": "test", @@ -45842,20 +47761,47 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"sethost\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}}\"\n}" + "raw": "{\n \"action\": \"delparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addhostgroup", + "name": "Listdep", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var depData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of dependencies\"] = depData;", + " var i = 0;", + " var nb_find = 0", + " while (i < depData.length) {", + " if (postman.getEnvironmentVariable(\"host_name\") == depData[i].parents)", + " {", + " tests[\"Body contains added a parent\"] = postman.getEnvironmentVariable(\"host_name\") == depData[i].parents;", + " nb_find += 1;", + " }", + " if (postman.getEnvironmentVariable(\"host_name3\") == depData[i].children)", + " {", + " tests[\"Body contains added a child\"] = postman.getEnvironmentVariable(\"host_name3\") == depData[i].children;", + " nb_find += 1;", + " }", + " if (nb_find == 2)", + " break;", + " i++;", + " }", + " if (i == depData.length)", + " tests[\"the child and the parent were found\"] = i < depData.length;", + "}", + "catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -45904,14 +47850,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" + "raw": "{\n \"action\": \"listdep\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delhostgroup", + "name": "Delchild", "event": [ { "listen": "test", @@ -45966,14 +47912,82 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delhostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" + "raw": "{\n \"action\": \"delchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" + }, + "description": "" + }, + "response": [] + } + ] + }, + { + "name": "70-ACL_Groups", + "description": "Tests all commands to manage ACL groups.", + "item": [ + { + "name": "Add ACL group", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "description": "", + "equals": true, + "key": "action", + "value": "action" + }, + { + "description": "", + "equals": true, + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;aclg_alias\"\n}" }, "description": "" }, "response": [] }, { - "name": "Sethostgroup", + "name": "Setparam name", "event": [ { "listen": "test", @@ -45999,16 +48013,16 @@ ], "query": [ { - "key": "action", - "value": "action", + "description": "", "equals": true, - "description": "" + "key": "action", + "value": "action" }, { - "key": "object", - "value": "centreon_clapi", + "description": "", "equals": true, - "description": "" + "key": "object", + "value": "centreon_clapi" } ], "variable": [] @@ -46016,26 +48030,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"sethostgroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{hg_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;name;{{aclg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addservice", + "name": "Setparam alias", "event": [ { "listen": "test", @@ -46062,15 +48076,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -46078,26 +48088,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};alias;{{aclg_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delservice", + "name": "Setparam activate", "event": [ { "listen": "test", @@ -46124,15 +48134,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -46140,32 +48146,51 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};activate;{{aclg_activate}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setservice", + "name": "List ACL groups", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL groups\"] = aclgData;", + " var i = 0;", + " while (i < aclgData.length) {", + " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", + " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", + " tests[\"Body contains added aclg_alias\"] = postman.getEnvironmentVariable(\"aclg_alias\") == aclgData[i].alias;", + " tests[\"Body contains added aclg_activate\"] = postman.getEnvironmentVariable(\"aclg_activate\") == aclgData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == aclgData.length)", + " tests[\"aclg_name was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -46185,16 +48210,16 @@ ], "query": [ { - "key": "action", - "value": "action", + "description": "", "equals": true, - "description": "" + "key": "action", + "value": "action" }, { - "key": "object", - "value": "centreon_clapi", + "description": "", "equals": true, - "description": "" + "key": "object", + "value": "centreon_clapi" } ], "variable": [] @@ -46202,26 +48227,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setservice\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{host_name}},{{service_description}}\"\n}" + "raw": "{\n \"action\": \"show\",\n \"object\": \"aclgroup\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addservicegroup", + "name": "Add resource ACL", "event": [ { "listen": "test", @@ -46248,15 +48273,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -46264,26 +48285,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;test_alias\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delservicegroup", + "name": "Setparam name", "event": [ { "listen": "test", @@ -46310,15 +48331,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -46326,26 +48343,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;name;{{racl_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setservicegroup", + "name": "Addresource", "event": [ { "listen": "test", @@ -46400,20 +48417,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setservicegroup\",\n \"object\": \"downtime\",\n \"values\": \"{{downtime_name}};{{sg_name}}\"\n}" + "raw": "{\n \"action\": \"addresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" }, "description": "" }, "response": [] - } - ] - }, - { - "name": "61-Dependencies", - "description": "Tests all commands to manage dependencies.", - "item": [ + }, { - "name": "Add dependency", + "name": "Delresource", "event": [ { "listen": "test", @@ -46468,72 +48479,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"dep\",\n \"values\": \"dep_test;test_description;{{dep_type}};{{host_name}}\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Setparam name", - "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", - "host": [ - "{{url}}" - ], - "path": [ - "centreon", - "api", - "index.php" - ], - "query": [ - { - "key": "action", - "value": "action" - }, - { - "key": "object", - "value": "centreon_clapi" - } - ], - "variable": [] - }, - "method": "POST", - "header": [ - { - "description": "", - "key": "Content-Type", - "value": "application/json" - }, - { - "description": "", - "key": "centreon-auth-token", - "value": "{{token}}" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"dep_test;name;{{dep_name}}\"\n}" + "raw": "{\n \"action\": \"delresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam description", + "name": "Setresource", "event": [ { "listen": "test", @@ -46560,11 +48513,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -46572,32 +48529,49 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};description;{{dep_description}}\"\n}" + "raw": "{\n \"action\": \"setresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam comment", + "name": "Getresource", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var raclData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL resources\"] = raclData;", + " var i = 0;", + " while (i < raclData.length) {", + " if (postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name) {", + " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == raclData.length)", + " tests[\"racl_name was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -46618,11 +48592,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -46630,26 +48608,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};comment;{{dep_comment}}\"\n}" + "raw": "{\n \"action\": \"getresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam inherits_parent", + "name": "Addcontact", "event": [ { "listen": "test", @@ -46676,11 +48654,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -46688,26 +48670,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};inherits_parent;{{dep_inherits_parent}}\"\n}" + "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam exec_fail_criteria", + "name": "Delcontact", "event": [ { "listen": "test", @@ -46734,11 +48716,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -46746,26 +48732,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};execution_failure_criteria;{{dep_exec_fail_crit}}\"\n}" + "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam notif_fail_criteria", + "name": "Setcontact", "event": [ { "listen": "test", @@ -46792,11 +48778,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -46804,26 +48794,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};notification_failure_criteria;{{dep_notif_fail_crit}}\"\n}" + "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "List dependencies", + "name": "Getcontact", "event": [ { "listen": "test", @@ -46831,27 +48821,21 @@ "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", - "var depData = jsonData.result;", + "var contactData = jsonData.result;", "", "try {", - " tests[\"Body contains list of dependencies\"] = depData;", + " tests[\"Body contains list of contacts\"] = contactData;", " var i = 0;", - " while (i < depData.length) {", - " if (postman.getEnvironmentVariable(\"dep_name\") == depData[i].name)", - " {", - " tests[\"Body contains added dep_name\"] = postman.getEnvironmentVariable(\"dep_name\") == depData[i].name;", - " tests[\"Body contains added dep_description\"] = postman.getEnvironmentVariable(\"dep_description\") == depData[i].description;", - " tests[\"Body contains added dep_inherits_parents\"] = postman.getEnvironmentVariable(\"dep_inherits_parent\") == depData[i].inherits_parent;", - " tests[\"Body contains added dep_execution_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_exec_fail_crit\") == depData[i].execution_failure_criteria;", - " tests[\"Body contains added dep_notification_failure_criteria\"] = postman.getEnvironmentVariable(\"dep_notif_fail_crit\") == depData[i].notification_failure_criteria;", + " while (i < contactData.length) {", + " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", + " tests[\"Body contains added contact\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", " break;", " }", " i++;", " }", - " if (i == depData.length)", - " tests[\"dep_name was found\"] = false;", - "}", - "catch (e) {}", + " if (i == contactData.length)", + " tests[\"aclg_contact_alias was found\"] = false;", + "} catch (e) {}", "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] @@ -46872,16 +48856,16 @@ ], "query": [ { - "description": "", - "equals": true, "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { - "description": "", - "equals": true, "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -46889,26 +48873,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"dep\"\n}" + "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addparent", + "name": "Addcontactgroup", "event": [ { "listen": "test", @@ -46963,14 +48947,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" + "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Create host3", + "name": "Delcontactgroup", "event": [ { "listen": "test", @@ -47025,14 +49009,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"host\",\n \"values\": \"{{host_name3}};{{host_name3}};0.0.0.0;;central;\"\n}" + "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addchild", + "name": "Setcontactgroup", "event": [ { "listen": "test", @@ -47087,20 +49071,37 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" + "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delparent", + "name": "Getcontactgroup", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var cgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of contact groups\"] = cgData;", + " var i = 0;", + " while (i < cgData.length) {", + " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", + " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == cgData.length)", + " tests[\"cg_name was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -47149,47 +49150,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delparent\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name2}}\"\n}" + "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Listdep", + "name": "Add ACL Menu", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var depData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of dependencies\"] = depData;", - " var i = 0;", - " var nb_find = 0", - " while (i < depData.length) {", - " if (postman.getEnvironmentVariable(\"host_name\") == depData[i].parents)", - " {", - " tests[\"Body contains added a parent\"] = postman.getEnvironmentVariable(\"host_name\") == depData[i].parents;", - " nb_find += 1;", - " }", - " if (postman.getEnvironmentVariable(\"host_name3\") == depData[i].children)", - " {", - " tests[\"Body contains added a child\"] = postman.getEnvironmentVariable(\"host_name3\") == depData[i].children;", - " nb_find += 1;", - " }", - " if (nb_find == 2)", - " break;", - " i++;", - " }", - " if (i == depData.length)", - " tests[\"the child and the parent were found\"] = i < depData.length;", - "}", - "catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -47210,15 +49184,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -47226,26 +49196,84 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"listdep\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}}\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;test_alias\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delchild", + "name": "Setparam name", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;name;{{aclmenu_name}}\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Addmenu", "event": [ { "listen": "test", @@ -47300,20 +49328,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delchild\",\n \"object\": \"dep\",\n \"values\": \"{{dep_name}};{{host_name3}}\"\n}" + "raw": "{\n \"action\": \"addmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" }, "description": "" }, "response": [] - } - ] - }, - { - "name": "70-ACL_Groups", - "description": "Tests all commands to manage ACL groups.", - "item": [ + }, { - "name": "Add ACL group", + "name": "Delmenu", "event": [ { "listen": "test", @@ -47339,16 +49361,16 @@ ], "query": [ { - "description": "", - "equals": true, "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { - "description": "", - "equals": true, "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -47356,26 +49378,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;aclg_alias\"\n}" + "raw": "{\n \"action\": \"delmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam name", + "name": "Setmenu", "event": [ { "listen": "test", @@ -47401,16 +49423,16 @@ ], "query": [ { - "description": "", - "equals": true, "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { - "description": "", - "equals": true, "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -47418,32 +49440,49 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"test_aclg;name;{{aclg_name}}\"\n}" + "raw": "{\n \"action\": \"setmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam alias", + "name": "Getmenu", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclmenuData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL menus\"] = aclmenuData;", + " var i = 0;", + " while (i < aclmenuData.length) {", + " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", + " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == aclmenuData.length)", + " tests[\"menu_name was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -47464,11 +49503,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -47476,26 +49519,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};alias;{{aclg_alias}}\"\n}" + "raw": "{\n \"action\": \"getmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam activate", + "name": "Add ACL action", "event": [ { "listen": "test", @@ -47521,10 +49564,14 @@ ], "query": [ { + "description": "", + "equals": true, "key": "action", "value": "action" }, { + "description": "", + "equals": true, "key": "object", "value": "centreon_clapi" } @@ -47546,39 +49593,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};activate;{{aclg_activate}}\"\n}" + "raw": "{\n \"action\": \"add\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;acla_description\"\n}" }, "description": "" }, "response": [] }, { - "name": "List ACL groups", + "name": "Setparam name", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL groups\"] = aclgData;", - " var i = 0;", - " while (i < aclgData.length) {", - " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", - " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", - " tests[\"Body contains added aclg_alias\"] = postman.getEnvironmentVariable(\"aclg_alias\") == aclgData[i].alias;", - " tests[\"Body contains added aclg_activate\"] = postman.getEnvironmentVariable(\"aclg_activate\") == aclgData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == aclgData.length)", - " tests[\"aclg_name was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -47627,14 +49655,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"aclgroup\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;name;{{acla_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Add resource ACL", + "name": "Addaction", "event": [ { "listen": "test", @@ -47661,11 +49689,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -47673,26 +49705,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;test_alias\"\n}" + "raw": "{\n \"action\": \"addaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam name", + "name": "Delaction", "event": [ { "listen": "test", @@ -47719,11 +49751,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -47731,26 +49767,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclresource\",\n \"values\": \"test_resourceacl;name;{{racl_name}}\"\n}" + "raw": "{\n \"action\": \"delaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addresource", + "name": "Setaction", "event": [ { "listen": "test", @@ -47805,20 +49841,37 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" + "raw": "{\n \"action\": \"setaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delresource", + "name": "Getaction", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclaData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL actions\"] = aclaData;", + " var i = 0;", + " while (i < aclaData.length) {", + " if (postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name) {", + " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i == aclaData.length)", + " tests[\"acla_name was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -47867,14 +49920,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" + "raw": "{\n \"action\": \"getaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" }, "description": "" }, "response": [] - }, + } + ] + }, + { + "name": "71-ACL_Menus", + "description": "Tests all commands to manage ACL menu.", + "item": [ { - "name": "Setresource", + "name": "Setparam alias", "event": [ { "listen": "test", @@ -47901,15 +49960,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -47917,49 +49972,32 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{racl_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};alias;{{aclmenu_alias}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getresource", + "name": "Setparam activate", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var raclData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL resources\"] = raclData;", - " var i = 0;", - " while (i < raclData.length) {", - " if (postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name) {", - " tests[\"Body contains added ACL resource\"] = postman.getEnvironmentVariable(\"racl_name\") == raclData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == raclData.length)", - " tests[\"racl_name was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -47980,15 +50018,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -47996,26 +50030,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getresource\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};activate;{{aclmenu_activate}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addcontact", + "name": "Setparam comment", "event": [ { "listen": "test", @@ -48042,15 +50076,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -48058,32 +50088,52 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" + "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};comment;{{aclmenu_comment}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delcontact", + "name": "List ACL menu", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclmenuData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL Menu\"] = aclmenuData;", + " var i = 0;", + " while (i < aclmenuData.length) {", + " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", + " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", + " tests[\"Body contains added aclmenu_alias\"] = postman.getEnvironmentVariable(\"aclmenu_alias\") == aclmenuData[i].alias;", + " tests[\"Body contains added aclmenu_comment\"] = postman.getEnvironmentVariable(\"aclmenu_comment\") == aclmenuData[i].comment;", + " tests[\"Body contains added aclmenu_activate\"] = postman.getEnvironmentVariable(\"aclmenu_activate\") == aclmenuData[i].activate;", + " break;", + " }", + " i++;", + " }", + " if (i == aclmenuData.length)", + " tests[\"aclmenu_name was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -48103,16 +50153,16 @@ ], "query": [ { - "key": "action", - "value": "action", + "description": "", "equals": true, - "description": "" + "key": "action", + "value": "action" }, { - "key": "object", - "value": "centreon_clapi", + "description": "", "equals": true, - "description": "" + "key": "object", + "value": "centreon_clapi" } ], "variable": [] @@ -48120,32 +50170,49 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}\"\n}" + "raw": "{\n \"action\": \"show\",\n \"object\": \"aclmenu\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setcontact", + "name": "Get ACL Groups", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var aclgData = jsonData.result;", + "", + "try {", + " tests[\"Body contains list of ACL Menu\"] = aclgData;", + " var i = 0;", + " while (i < aclgData.length) {", + " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", + " tests[\"Body contains ACL menu\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", + " break;", + " }", + " i++;", + " }", + " if (i > aclgData.length)", + " tests[\"aclg_name was found\"] = false;", + "} catch (e) {}", + "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -48194,37 +50261,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{contact_alias}}|{{contact_alias2}}\"\n}" + "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}}\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getcontact", + "name": "Grantrw Home", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var contactData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contacts\"] = contactData;", - " var i = 0;", - " while (i < contactData.length) {", - " if (postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name) {", - " tests[\"Body contains added contact\"] = postman.getEnvironmentVariable(\"contact_alias\") == contactData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == contactData.length)", - " tests[\"aclg_contact_alias was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -48245,15 +50295,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -48261,26 +50307,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getcontact\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addcontactgroup", + "name": "Revoke Home", "event": [ { "listen": "test", @@ -48307,15 +50353,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -48323,26 +50365,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delcontactgroup", + "name": "Grantrw Custom Views", "event": [ { "listen": "test", @@ -48369,15 +50411,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -48385,26 +50423,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setcontactgroup", + "name": "Revoke Custom Views", "event": [ { "listen": "test", @@ -48431,15 +50469,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -48447,49 +50481,32 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{cg_name}}\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getcontactgroup", + "name": "Grantrw Edit View", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var cgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of contact groups\"] = cgData;", - " var i = 0;", - " while (i < cgData.length) {", - " if (postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name) {", - " tests[\"Body contains added cg_name\"] = postman.getEnvironmentVariable(\"cg_name\") == cgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == cgData.length)", - " tests[\"cg_name was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -48538,14 +50555,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getcontactgroup\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" }, "description": "" }, "response": [] }, { - "name": "Add ACL Menu", + "name": "Revoke Edit View", "event": [ { "listen": "test", @@ -48572,11 +50589,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -48584,26 +50605,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;test_alias\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam name", + "name": "Grantrw Share View", "event": [ { "listen": "test", @@ -48630,11 +50651,15 @@ "query": [ { "key": "action", - "value": "action" + "value": "action", + "equals": true, + "description": "" }, { "key": "object", - "value": "centreon_clapi" + "value": "centreon_clapi", + "equals": true, + "description": "" } ], "variable": [] @@ -48642,26 +50667,26 @@ "method": "POST", "header": [ { - "description": "", "key": "Content-Type", - "value": "application/json" + "value": "application/json", + "description": "" }, { - "description": "", "key": "centreon-auth-token", - "value": "{{token}}" + "value": "{{token}}", + "description": "" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"test_aclmenu;name;{{aclmenu_name}}\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addmenu", + "name": "Revoke Share View", "event": [ { "listen": "test", @@ -48716,14 +50741,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delmenu", + "name": "Grantrw Widget Parameters", "event": [ { "listen": "test", @@ -48778,14 +50803,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setmenu", + "name": "Revoke Widget Parameters", "event": [ { "listen": "test", @@ -48840,37 +50865,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{aclmenu_name}}\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getmenu", + "name": "Grantrw Add Widget", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclmenuData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL menus\"] = aclmenuData;", - " var i = 0;", - " while (i < aclmenuData.length) {", - " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", - " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == aclmenuData.length)", - " tests[\"menu_name was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -48891,15 +50899,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -48907,26 +50911,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getmenu\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" }, "description": "" }, "response": [] }, { - "name": "Add ACL action", + "name": "Revoke Add Widget", "event": [ { "listen": "test", @@ -48952,14 +50956,10 @@ ], "query": [ { - "description": "", - "equals": true, "key": "action", "value": "action" }, { - "description": "", - "equals": true, "key": "object", "value": "centreon_clapi" } @@ -48981,14 +50981,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"add\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;acla_description\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam name", + "name": "Grantrw rotation", "event": [ { "listen": "test", @@ -49014,14 +51014,10 @@ ], "query": [ { - "description": "", - "equals": true, "key": "action", "value": "action" }, { - "description": "", - "equals": true, "key": "object", "value": "centreon_clapi" } @@ -49043,14 +51039,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclaction\",\n \"values\": \"test_acla;name;{{acla_name}}\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" }, "description": "" }, "response": [] }, { - "name": "Addaction", + "name": "Revoke rotation", "event": [ { "listen": "test", @@ -49077,15 +51073,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -49093,26 +51085,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"addaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" }, "description": "" }, "response": [] }, { - "name": "Delaction", + "name": "Grantrw delete view", "event": [ { "listen": "test", @@ -49139,15 +51131,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -49155,26 +51143,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"delaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setaction", + "name": "Revoke delete view", "event": [ { "listen": "test", @@ -49201,15 +51189,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -49217,49 +51201,32 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}};{{acla_name}}\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" }, "description": "" }, "response": [] }, { - "name": "Getaction", + "name": "Grantrw add view", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclaData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL actions\"] = aclaData;", - " var i = 0;", - " while (i < aclaData.length) {", - " if (postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name) {", - " tests[\"Body contains added ACL action\"] = postman.getEnvironmentVariable(\"acla_name\") == aclaData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i == aclaData.length)", - " tests[\"acla_name was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -49280,15 +51247,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -49296,32 +51259,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getaction\",\n \"object\": \"aclgroup\",\n \"values\": \"{{aclg_name}}\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" }, "description": "" }, "response": [] - } - ] - }, - { - "name": "71-ACL_Menus", - "description": "Tests all commands to manage ACL menu.", - "item": [ + }, { - "name": "Setparam alias", + "name": "Revoke add view", "event": [ { "listen": "test", @@ -49372,14 +51329,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};alias;{{aclmenu_alias}}\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam activate", + "name": "Grantrw set default", "event": [ { "listen": "test", @@ -49430,14 +51387,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};activate;{{aclmenu_activate}}\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" }, "description": "" }, "response": [] }, { - "name": "Setparam comment", + "name": "Revoke set default", "event": [ { "listen": "test", @@ -49488,40 +51445,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"setparam\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};comment;{{aclmenu_comment}}\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" }, "description": "" }, "response": [] }, { - "name": "List ACL menu", + "name": "Grantrw poller statistics", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclmenuData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL Menu\"] = aclmenuData;", - " var i = 0;", - " while (i < aclmenuData.length) {", - " if (postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name) {", - " tests[\"Body contains added ACL menu\"] = postman.getEnvironmentVariable(\"aclmenu_name\") == aclmenuData[i].name;", - " tests[\"Body contains added aclmenu_alias\"] = postman.getEnvironmentVariable(\"aclmenu_alias\") == aclmenuData[i].alias;", - " tests[\"Body contains added aclmenu_comment\"] = postman.getEnvironmentVariable(\"aclmenu_comment\") == aclmenuData[i].comment;", - " tests[\"Body contains added aclmenu_activate\"] = postman.getEnvironmentVariable(\"aclmenu_activate\") == aclmenuData[i].activate;", - " break;", - " }", - " i++;", - " }", - " if (i == aclmenuData.length)", - " tests[\"aclmenu_name was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -49541,14 +51478,10 @@ ], "query": [ { - "description": "", - "equals": true, "key": "action", "value": "action" }, { - "description": "", - "equals": true, "key": "object", "value": "centreon_clapi" } @@ -49570,37 +51503,20 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"show\",\n \"object\": \"aclmenu\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" }, "description": "" }, "response": [] }, { - "name": "Get ACL Groups", + "name": "Revoke poller statistics", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ - "var jsonData = JSON.parse(responseBody);", - "var aclgData = jsonData.result;", - "", - "try {", - " tests[\"Body contains list of ACL Menu\"] = aclgData;", - " var i = 0;", - " while (i < aclgData.length) {", - " if (postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name) {", - " tests[\"Body contains ACL menu\"] = postman.getEnvironmentVariable(\"aclg_name\") == aclgData[i].name;", - " break;", - " }", - " i++;", - " }", - " if (i > aclgData.length)", - " tests[\"aclg_name was found\"] = false;", - "} catch (e) {}", - "", "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } @@ -49621,15 +51537,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -49637,26 +51549,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"getaclgroup\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}}\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant Home", + "name": "Grantrw broker statistics", "event": [ { "listen": "test", @@ -49707,14 +51619,72 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke Home", + "name": "Revoke broker statistics", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw graphs (poller)", "event": [ { "listen": "test", @@ -49765,14 +51735,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant Custom Views", + "name": "Revoke graphs (poller)", "event": [ { "listen": "test", @@ -49823,14 +51793,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke Custom Views", + "name": "Grantrw monitoring", "event": [ { "listen": "test", @@ -49881,138 +51851,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant Edit View", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke Edit View", - "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", - "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": "" - }, - { - "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Edit View\"\n}" - }, - "description": "" - }, - "response": [] - }, - { - "name": "Grant Share View", + "name": "Revoke monitoring", "event": [ { "listen": "test", @@ -50039,15 +51885,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -50055,26 +51897,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke Share View", + "name": "Grantrw status details", "event": [ { "listen": "test", @@ -50101,15 +51943,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -50117,26 +51955,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Share View\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant Widget Parameters", + "name": "Revoke status details", "event": [ { "listen": "test", @@ -50163,15 +52001,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -50179,26 +52013,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke Widget Parameters", + "name": "Grantrw services (monitoring)", "event": [ { "listen": "test", @@ -50225,15 +52059,11 @@ "query": [ { "key": "action", - "value": "action", - "equals": true, - "description": "" + "value": "action" }, { "key": "object", - "value": "centreon_clapi", - "equals": true, - "description": "" + "value": "centreon_clapi" } ], "variable": [] @@ -50241,26 +52071,26 @@ "method": "POST", "header": [ { + "description": "", "key": "Content-Type", - "value": "application/json", - "description": "" + "value": "application/json" }, { + "description": "", "key": "centreon-auth-token", - "value": "{{token}}", - "description": "" + "value": "{{token}}" } ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;Widget Parameters\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant Add Widget", + "name": "Revoke services (monitoring)", "event": [ { "listen": "test", @@ -50311,14 +52141,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke Add Widget", + "name": "Grantrw hosts (monitoring)", "event": [ { "listen": "test", @@ -50369,14 +52199,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add Widget\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant rotation", + "name": "Revoke hosts (monitoring)", "event": [ { "listen": "test", @@ -50427,14 +52257,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke rotation", + "name": "Grantrw services grid", "event": [ { "listen": "test", @@ -50485,14 +52315,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;rotation\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant delete view", + "name": "Revoke services grid", "event": [ { "listen": "test", @@ -50543,14 +52373,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke delete view", + "name": "Grantrw services by hostgroup", "event": [ { "listen": "test", @@ -50601,14 +52431,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;delete view\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant add view", + "name": "Revoke services by hostgroup", "event": [ { "listen": "test", @@ -50659,14 +52489,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke add view", + "name": "Grantrw services by servicegroup", "event": [ { "listen": "test", @@ -50717,14 +52547,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;add view\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant set default", + "name": "Revoke services by servicegroup", "event": [ { "listen": "test", @@ -50775,14 +52605,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke set default", + "name": "Grantrw hostgroups summary", "event": [ { "listen": "test", @@ -50833,14 +52663,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;Custom Views;set default\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant poller statistics", + "name": "Revoke hostgroups summary", "event": [ { "listen": "test", @@ -50891,14 +52721,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke poller statistics", + "name": "Grantrw performances", "event": [ { "listen": "test", @@ -50949,14 +52779,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant broker statistics", + "name": "Revoke performances", "event": [ { "listen": "test", @@ -51007,14 +52837,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke broker statistics", + "name": "Grantrw graphs", "event": [ { "listen": "test", @@ -51065,14 +52895,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;broker statistics\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant graphs (poller)", + "name": "Revoke graphs", "event": [ { "listen": "test", @@ -51123,14 +52953,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke graphs (poller)", + "name": "Grantrw chart split", "event": [ { "listen": "test", @@ -51181,14 +53011,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};Home;poller statistics;graphs\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant monitoring", + "name": "Revoke chart split", "event": [ { "listen": "test", @@ -51239,14 +53069,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke monitoring", + "name": "Grantrw chart periods", "event": [ { "listen": "test", @@ -51297,14 +53127,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant status details", + "name": "Revoke chart periods", "event": [ { "listen": "test", @@ -51355,14 +53185,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke status details", + "name": "Grantrw templates (perf)", "event": [ { "listen": "test", @@ -51413,14 +53243,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant services (monitoring)", + "name": "Revoke templates (perf)", "event": [ { "listen": "test", @@ -51471,14 +53301,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services (monitoring)", + "name": "Grantrw curves", "event": [ { "listen": "test", @@ -51529,14 +53359,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant hosts (monitoring)", + "name": "Revoke curves", "event": [ { "listen": "test", @@ -51587,14 +53417,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke hosts (monitoring)", + "name": "Grantrw metrics", "event": [ { "listen": "test", @@ -51645,14 +53475,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hosts\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant services grid", + "name": "Revoke metrics", "event": [ { "listen": "test", @@ -51703,14 +53533,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services grid", + "name": "Grantrw event logs", "event": [ { "listen": "test", @@ -51761,14 +53591,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services grid\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant services by hostgroup", + "name": "Revoke event logs", "event": [ { "listen": "test", @@ -51819,14 +53649,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services by hostgroup", + "name": "Grantrw event logs (advanced)", "event": [ { "listen": "test", @@ -51877,14 +53707,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by hostgroup\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant services by servicegroup", + "name": "Revoke event logs (advanced)", "event": [ { "listen": "test", @@ -51935,14 +53765,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services by servicegroup", + "name": "Grantrw system logs", "event": [ { "listen": "test", @@ -51993,14 +53823,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;services by servicegroup\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant hostgroups summary", + "name": "Revoke system logs", "event": [ { "listen": "test", @@ -52051,14 +53881,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke hostgroups summary", + "name": "Grantrw downtimes", "event": [ { "listen": "test", @@ -52109,14 +53939,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;status details;hostgroups summary\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant performances", + "name": "Revoke downtimes", "event": [ { "listen": "test", @@ -52167,14 +53997,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke performances", + "name": "Grantrw downtimes (main menu)", "event": [ { "listen": "test", @@ -52225,14 +54055,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant graphs", + "name": "Revoke downtimes (main menu)", "event": [ { "listen": "test", @@ -52283,14 +54113,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke graphs", + "name": "Grantrw recurrent downtimes", "event": [ { "listen": "test", @@ -52341,14 +54171,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant chart split", + "name": "Grantro recurrent downtimes", "event": [ { "listen": "test", @@ -52399,14 +54229,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke chart split", + "name": "Revoke recurrent downtimes", "event": [ { "listen": "test", @@ -52457,14 +54287,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart split\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant chart periods", + "name": "Grantrw comments", "event": [ { "listen": "test", @@ -52515,14 +54345,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke chart periods", + "name": "Revoke comments", "event": [ { "listen": "test", @@ -52573,14 +54403,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;graphs;chart periods\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant templates (perf)", + "name": "Grantrw reporting", "event": [ { "listen": "test", @@ -52631,14 +54461,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke templates (perf)", + "name": "Revoke reporting", "event": [ { "listen": "test", @@ -52689,14 +54519,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;templates\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant curves", + "name": "Grantrw dashboard", "event": [ { "listen": "test", @@ -52747,14 +54577,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke curves", + "name": "Revoke dashboard", "event": [ { "listen": "test", @@ -52805,14 +54635,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;curves\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant metrics", + "name": "Grantrw hosts (dashboard)", "event": [ { "listen": "test", @@ -52863,14 +54693,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke metrics", + "name": "Revoke hosts (dashboard)", "event": [ { "listen": "test", @@ -52921,14 +54751,246 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;performances;metrics\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw services (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke services (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantrw host groups (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Revoke host groups (dashboard)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant event logs", + "name": "Grantrw service groups (dashboard)", "event": [ { "listen": "test", @@ -52979,14 +55041,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke event logs", + "name": "Revoke service groups (dashboard)", "event": [ { "listen": "test", @@ -53037,14 +55099,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant event logs (advanced)", + "name": "Grantrw configuration", "event": [ { "listen": "test", @@ -53095,14 +55157,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke event logs (advanced)", + "name": "Revoke configuration", "event": [ { "listen": "test", @@ -53153,14 +55215,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;event logs\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant system logs", + "name": "Grant hostsrw (config)", "event": [ { "listen": "test", @@ -53211,14 +55273,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke system logs", + "name": "Revoke hosts (config)", "event": [ { "listen": "test", @@ -53269,19 +55331,19 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;event logs;system logs\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant downtimes", + "name": "Grant hostsrw (config/host)", "event": [ { "listen": "test", "script": { - "type": "text/javascript", + "type": "text/javascript", "exec": [ "tests[\"Status code is 200\"] = responseCode.code === 200;" ] @@ -53327,14 +55389,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke downtimes", + "name": "Grant hostsro (config/host)", "event": [ { "listen": "test", @@ -53385,14 +55447,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant downtimes (main menu)", + "name": "Revoke hosts (config/host)", "event": [ { "listen": "test", @@ -53443,14 +55505,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke downtimes (main menu)", + "name": "Grantrw host groups (config/hosts)", "event": [ { "listen": "test", @@ -53501,14 +55563,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;downtimes\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant recurrent downtimes", + "name": "Grantro host groups (config/hosts)", "event": [ { "listen": "test", @@ -53559,14 +55621,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke recurrent downtimes", + "name": "Revoke host groups (config/hosts)", "event": [ { "listen": "test", @@ -53617,14 +55679,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;recurrent downtimes\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant comments", + "name": "Grantrw templates (config/hosts)", "event": [ { "listen": "test", @@ -53675,14 +55737,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke comments", + "name": "Grantro templates (config/hosts)", "event": [ { "listen": "test", @@ -53733,14 +55795,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};monitoring;downtimes;comments\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant reporting", + "name": "Revoke templates (config/hosts)", "event": [ { "listen": "test", @@ -53791,14 +55853,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke reporting", + "name": "Grantrw categories (config/hosts)", "event": [ { "listen": "test", @@ -53849,14 +55911,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant dashboard", + "name": "Grantro categories (config/hosts)", "event": [ { "listen": "test", @@ -53907,14 +55969,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke dashboard", + "name": "Revoke categories (config/hosts)", "event": [ { "listen": "test", @@ -53965,14 +56027,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant hosts (dashboard)", + "name": "Grantrw services (config)", "event": [ { "listen": "test", @@ -54023,14 +56085,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke hosts (dashboard)", + "name": "Revoke services (config)", "event": [ { "listen": "test", @@ -54081,14 +56143,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;hosts\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant services (dashboard)", + "name": "Grantrw services by host (config/services)", "event": [ { "listen": "test", @@ -54139,14 +56201,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services (dashboard)", + "name": "Grantro services by host (config/services)", "event": [ { "listen": "test", @@ -54197,14 +56259,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;services\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant host groups (dashboard)", + "name": "Revoke services by host (config/services)", "event": [ { "listen": "test", @@ -54255,14 +56317,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke host groups (dashboard)", + "name": "Grantrw services by host group (config/services)", "event": [ { "listen": "test", @@ -54313,14 +56375,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;host groups\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant service groups (dashboard)", + "name": "Grantro services by host group (config/services)", "event": [ { "listen": "test", @@ -54371,14 +56433,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke service groups (dashboard)", + "name": "Revoke services by host group (config/services)", "event": [ { "listen": "test", @@ -54429,14 +56491,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};reporting;dashboard;service groups\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant configuration", + "name": "Grantrw service groups (config/services)", "event": [ { "listen": "test", @@ -54487,14 +56549,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke configuration", + "name": "Grantro service groups (config/services)", "event": [ { "listen": "test", @@ -54545,14 +56607,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant hosts (config)", + "name": "Revoke service groups (config/services)", "event": [ { "listen": "test", @@ -54603,14 +56665,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke hosts (config)", + "name": "Grantrw templates (config/services)", "event": [ { "listen": "test", @@ -54661,14 +56723,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant hosts (config/host)", + "name": "Grantro templates (config/services)", "event": [ { "listen": "test", @@ -54719,14 +56781,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke hosts (config/host)", + "name": "Revoke templates (config/services)", "event": [ { "listen": "test", @@ -54777,14 +56839,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;hosts\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant host groups (config/hosts)", + "name": "Grantrw categories (config/services)", "event": [ { "listen": "test", @@ -54835,14 +56897,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke host groups (config/hosts)", + "name": "Grantro categories (config/services)", "event": [ { "listen": "test", @@ -54893,14 +56955,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;host groups\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant templates (config/hosts)", + "name": "Revoke categories (config/services)", "event": [ { "listen": "test", @@ -54951,14 +57013,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke templates (config/hosts)", + "name": "Grantrw meta services(config/services)", "event": [ { "listen": "test", @@ -55009,14 +57071,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;templates\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant categories (config/hosts)", + "name": "Revoke meta services(config/services)", "event": [ { "listen": "test", @@ -55067,14 +57129,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke categories (config/hosts)", + "name": "Grantrw users", "event": [ { "listen": "test", @@ -55125,14 +57187,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;hosts;categories\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant services (config)", + "name": "Revoke users", "event": [ { "listen": "test", @@ -55183,14 +57245,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services (config)", + "name": "Grantrw Contacts / Users", "event": [ { "listen": "test", @@ -55241,14 +57303,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant services by host (config/services)", + "name": "Grantro Contacts / Users", "event": [ { "listen": "test", @@ -55299,14 +57361,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services by host (config/services)", + "name": "Revoke Contacts / Users", "event": [ { "listen": "test", @@ -55357,14 +57419,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant services by host group (config/services)", + "name": "Grantrw contact templates", "event": [ { "listen": "test", @@ -55415,14 +57477,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services by host group (config/services)", + "name": "Grantro contact templates", "event": [ { "listen": "test", @@ -55473,14 +57535,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;services by host group\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant service groups (config/services)", + "name": "Revoke contact templates", "event": [ { "listen": "test", @@ -55531,14 +57593,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke service groups (config/services)", + "name": "Grantrw contact groups", "event": [ { "listen": "test", @@ -55589,14 +57651,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;service groups\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant templates (config/services)", + "name": "Grantro contact groups", "event": [ { "listen": "test", @@ -55647,14 +57709,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke templates (config/services)", + "name": "Revoke contact groups", "event": [ { "listen": "test", @@ -55705,14 +57767,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;templates\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant categories (config/services)", + "name": "Grantrw time periods", "event": [ { "listen": "test", @@ -55763,14 +57825,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke categories (config/services)", + "name": "Grantro time periods", "event": [ { "listen": "test", @@ -55821,14 +57883,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;categories\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant meta services(config/services)", + "name": "Revoke time periods", "event": [ { "listen": "test", @@ -55879,14 +57941,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke meta services(config/services)", + "name": "Grantrw commands", "event": [ { "listen": "test", @@ -55937,14 +57999,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;services;meta services\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant users", + "name": "Revoke commands", "event": [ { "listen": "test", @@ -55995,14 +58057,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke users", + "name": "Grantrw checks", "event": [ { "listen": "test", @@ -56053,14 +58115,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant Contacts / Users", + "name": "Grantro checks", "event": [ { "listen": "test", @@ -56111,14 +58173,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke Contacts / Users", + "name": "Revoke checks", "event": [ { "listen": "test", @@ -56169,14 +58231,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contacts / users\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant contact templates", + "name": "Grantrw notifications", "event": [ { "listen": "test", @@ -56227,14 +58289,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke contact templates", + "name": "Grantro notifications", "event": [ { "listen": "test", @@ -56285,14 +58347,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact templates\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant contact groups", + "name": "Revoke notifications", "event": [ { "listen": "test", @@ -56343,14 +58405,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke contact groups", + "name": "Grantrw discovery", "event": [ { "listen": "test", @@ -56401,14 +58463,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;contact groups\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant time periods", + "name": "Grantro discovery", "event": [ { "listen": "test", @@ -56459,14 +58521,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke time periods", + "name": "Revoke discovery", "event": [ { "listen": "test", @@ -56517,14 +58579,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;users;time periods\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant commands", + "name": "Grantrw miscellaneous", "event": [ { "listen": "test", @@ -56575,14 +58637,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke commands", + "name": "Grantro miscellaneous", "event": [ { "listen": "test", @@ -56633,14 +58695,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant checks", + "name": "Revoke miscellaneous", "event": [ { "listen": "test", @@ -56691,14 +58753,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke checks", + "name": "Grantrw connectors", "event": [ { "listen": "test", @@ -56749,14 +58811,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;checks\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant notifications", + "name": "Grantro connectors", "event": [ { "listen": "test", @@ -56807,14 +58869,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke notifications", + "name": "Revoke connectors", "event": [ { "listen": "test", @@ -56865,14 +58927,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;notifications\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant discovery", + "name": "Grantrw notifications", "event": [ { "listen": "test", @@ -56923,14 +58985,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke discovery", + "name": "Revoke notifications", "event": [ { "listen": "test", @@ -56981,14 +59043,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;discovery\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant miscellaneous", + "name": "Grantrw escalations", "event": [ { "listen": "test", @@ -57039,14 +59101,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke miscellaneous", + "name": "Grantro escalations", "event": [ { "listen": "test", @@ -57097,14 +59159,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;miscellaneous\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant connectors", + "name": "Revoke escalations", "event": [ { "listen": "test", @@ -57155,14 +59217,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke connectors", + "name": "Grantrw hosts (dependencies)", "event": [ { "listen": "test", @@ -57213,14 +59275,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;commands;connectors\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant notifications", + "name": "Grantro hosts (dependencies)", "event": [ { "listen": "test", @@ -57271,14 +59333,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke notifications", + "name": "Revoke hosts (dependencies)", "event": [ { "listen": "test", @@ -57329,14 +59391,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant escalations", + "name": "Grantrw host groups (dependencies)", "event": [ { "listen": "test", @@ -57387,14 +59449,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke escalations", + "name": "Grantro host groups (dependencies)", "event": [ { "listen": "test", @@ -57445,14 +59507,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;escalations\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant hosts (dependencies)", + "name": "Revoke host groups (dependencies)", "event": [ { "listen": "test", @@ -57503,14 +59565,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke hosts (dependencies)", + "name": "Grantrw services(dependencies)", "event": [ { "listen": "test", @@ -57561,14 +59623,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;hosts\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant host groups (dependencies)", + "name": "Grantro services(dependencies)", "event": [ { "listen": "test", @@ -57619,14 +59681,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke host groups (dependencies)", + "name": "Revoke services(dependencies)", "event": [ { "listen": "test", @@ -57677,14 +59739,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;host groups\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant services(dependencies)", + "name": "Grantrw service groups(dependencies)", "event": [ { "listen": "test", @@ -57735,14 +59797,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke services(dependencies)", + "name": "Grantro service groups(dependencies)", "event": [ { "listen": "test", @@ -57793,14 +59855,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;services\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant service groups(dependencies)", + "name": "Revoke service groups(dependencies)", "event": [ { "listen": "test", @@ -57851,14 +59913,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" + "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" }, "description": "" }, "response": [] }, { - "name": "Revoke service groups(dependencies)", + "name": "Grantrw meta services (dependencies)", "event": [ { "listen": "test", @@ -57909,14 +59971,14 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"revoke\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;service groups\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" }, "description": "" }, "response": [] }, { - "name": "Grant meta services (dependencies)", + "name": "Grantro meta services (dependencies)", "event": [ { "listen": "test", @@ -57967,7 +60029,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;notifications;meta services\"\n}" }, "description": "" }, @@ -58032,7 +60094,7 @@ "response": [] }, { - "name": "Grant SNMP traps (config)", + "name": "Grantrw SNMP traps (config)", "event": [ { "listen": "test", @@ -58083,7 +60145,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps\"\n}" }, "description": "" }, @@ -58148,7 +60210,7 @@ "response": [] }, { - "name": "Grant SNMP traps (SNMP)", + "name": "Grantrw SNMP traps (SNMP)", "event": [ { "listen": "test", @@ -58199,7 +60261,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;snmp traps\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;snmp traps\"\n}" }, "description": "" }, @@ -58264,7 +60326,7 @@ "response": [] }, { - "name": "Grant manufacturer", + "name": "Grantrw manufacturer", "event": [ { "listen": "test", @@ -58315,7 +60377,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;manufacturer\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;manufacturer\"\n}" }, "description": "" }, @@ -58380,7 +60442,7 @@ "response": [] }, { - "name": "Grant group (SNMP)", + "name": "Grantrw group (SNMP)", "event": [ { "listen": "test", @@ -58431,7 +60493,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;group\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;group\"\n}" }, "description": "" }, @@ -58496,7 +60558,7 @@ "response": [] }, { - "name": "Grant mibs", + "name": "Grantrw mibs", "event": [ { "listen": "test", @@ -58547,7 +60609,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;mibs\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;mibs\"\n}" }, "description": "" }, @@ -58612,7 +60674,7 @@ "response": [] }, { - "name": "Grant generate", + "name": "Grantrw generate", "event": [ { "listen": "test", @@ -58663,7 +60725,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;generate\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;SNMP traps;generate\"\n}" }, "description": "" }, @@ -58728,7 +60790,7 @@ "response": [] }, { - "name": "Grant knowledge base", + "name": "Grantrw knowledge base", "event": [ { "listen": "test", @@ -58779,7 +60841,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base\"\n}" }, "description": "" }, @@ -58844,7 +60906,7 @@ "response": [] }, { - "name": "Grant hosts (knowledge)", + "name": "Grantrw hosts (knowledge)", "event": [ { "listen": "test", @@ -58895,7 +60957,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;hosts\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;hosts\"\n}" }, "description": "" }, @@ -58960,7 +61022,7 @@ "response": [] }, { - "name": "Grant services (knowledge)", + "name": "Grantrw services (knowledge)", "event": [ { "listen": "test", @@ -59011,7 +61073,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;services\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;services\"\n}" }, "description": "" }, @@ -59076,7 +61138,7 @@ "response": [] }, { - "name": "Grant host templates (knowledge)", + "name": "Grantrw host templates (knowledge)", "event": [ { "listen": "test", @@ -59127,7 +61189,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;host templates\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;host templates\"\n}" }, "description": "" }, @@ -59192,7 +61254,7 @@ "response": [] }, { - "name": "Grant service templates (knowledge)", + "name": "Grantrw service templates (knowledge)", "event": [ { "listen": "test", @@ -59243,7 +61305,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;service templates\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;knowledge base;service templates\"\n}" }, "description": "" }, @@ -59308,7 +61370,7 @@ "response": [] }, { - "name": "Grant pollers (config)", + "name": "Grantrw pollers (config)", "event": [ { "listen": "test", @@ -59359,7 +61421,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers\"\n}" }, "description": "" }, @@ -59424,7 +61486,7 @@ "response": [] }, { - "name": "Grant export configuration", + "name": "Grantrw export configuration", "event": [ { "listen": "test", @@ -59475,7 +61537,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;export configuration\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;export configuration\"\n}" }, "description": "" }, @@ -59540,7 +61602,65 @@ "response": [] }, { - "name": "Grant pollers (pollers)", + "name": "Grantrw pollers (pollers)", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro pollers (pollers)", "event": [ { "listen": "test", @@ -59591,7 +61711,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;pollers\"\n}" }, "description": "" }, @@ -59656,7 +61776,7 @@ "response": [] }, { - "name": "Grant engine configuration", + "name": "Grantrw engine configuration", "event": [ { "listen": "test", @@ -59707,7 +61827,65 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" + }, + "description": "" + }, + "response": [] + }, + { + "name": "Grantro engine configuration", + "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", + "host": [ + "{{url}}" + ], + "path": [ + "centreon", + "api", + "index.php" + ], + "query": [ + { + "key": "action", + "value": "action" + }, + { + "key": "object", + "value": "centreon_clapi" + } + ], + "variable": [] + }, + "method": "POST", + "header": [ + { + "description": "", + "key": "Content-Type", + "value": "application/json" + }, + { + "description": "", + "key": "centreon-auth-token", + "value": "{{token}}" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"action\": \"grantro\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;engine configuration\"\n}" }, "description": "" }, @@ -59772,7 +61950,7 @@ "response": [] }, { - "name": "Grant broker configuration", + "name": "Grantrw broker configuration", "event": [ { "listen": "test", @@ -59823,7 +62001,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration\"\n}" }, "description": "" }, @@ -59888,7 +62066,7 @@ "response": [] }, { - "name": "Grant wizard", + "name": "Grantrw wizard", "event": [ { "listen": "test", @@ -59939,7 +62117,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizard\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizard\"\n}" }, "description": "" }, @@ -60004,7 +62182,7 @@ "response": [] }, { - "name": "Grant wizardajax", + "name": "Grantrw wizardajax", "event": [ { "listen": "test", @@ -60055,7 +62233,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizardajax\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;broker configuration;wizardajax\"\n}" }, "description": "" }, @@ -60120,7 +62298,7 @@ "response": [] }, { - "name": "Grant resources", + "name": "Grantrw resources", "event": [ { "listen": "test", @@ -60171,7 +62349,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;resources\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};configuration;pollers;resources\"\n}" }, "description": "" }, @@ -60236,7 +62414,7 @@ "response": [] }, { - "name": "Grant administration", + "name": "Grantrw administration", "event": [ { "listen": "test", @@ -60287,7 +62465,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration\"\n}" }, "description": "" }, @@ -60352,7 +62530,7 @@ "response": [] }, { - "name": "Grant parameters", + "name": "Grantrw parameters", "event": [ { "listen": "test", @@ -60403,7 +62581,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters\"\n}" }, "description": "" }, @@ -60468,7 +62646,7 @@ "response": [] }, { - "name": "Grant centreon UI", + "name": "Grantrw centreon UI", "event": [ { "listen": "test", @@ -60519,7 +62697,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centreon UI\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centreon UI\"\n}" }, "description": "" }, @@ -60584,7 +62762,7 @@ "response": [] }, { - "name": "Grant monitoring (parameters)", + "name": "Grantrw monitoring (parameters)", "event": [ { "listen": "test", @@ -60635,7 +62813,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;monitoring\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;monitoring\"\n}" }, "description": "" }, @@ -60700,7 +62878,7 @@ "response": [] }, { - "name": "Grant centcore", + "name": "Grantrw centcore", "event": [ { "listen": "test", @@ -60751,7 +62929,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centcore\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;centcore\"\n}" }, "description": "" }, @@ -60816,7 +62994,7 @@ "response": [] }, { - "name": "Grant my account", + "name": "Grantrw my account", "event": [ { "listen": "test", @@ -60867,7 +63045,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;my account\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;my account\"\n}" }, "description": "" }, @@ -60932,7 +63110,7 @@ "response": [] }, { - "name": "Grant LDAP", + "name": "Grantrw LDAP", "event": [ { "listen": "test", @@ -60983,7 +63161,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;LDAP\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;LDAP\"\n}" }, "description": "" }, @@ -61048,7 +63226,7 @@ "response": [] }, { - "name": "Grant RRDtool", + "name": "Grantrw RRDtool", "event": [ { "listen": "test", @@ -61099,7 +63277,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;RRDtool\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;RRDtool\"\n}" }, "description": "" }, @@ -61164,7 +63342,7 @@ "response": [] }, { - "name": "Grant debug", + "name": "Grantrw debug", "event": [ { "listen": "test", @@ -61215,7 +63393,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;debug\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;debug\"\n}" }, "description": "" }, @@ -61280,7 +63458,7 @@ "response": [] }, { - "name": "Grant knowledge base (parameters)", + "name": "Grantrw knowledge base (parameters)", "event": [ { "listen": "test", @@ -61331,7 +63509,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;knowledge base\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;knowledge base\"\n}" }, "description": "" }, @@ -61396,7 +63574,7 @@ "response": [] }, { - "name": "Grant CSS", + "name": "Grantrw CSS", "event": [ { "listen": "test", @@ -61447,7 +63625,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;CSS\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;CSS\"\n}" }, "description": "" }, @@ -61512,7 +63690,7 @@ "response": [] }, { - "name": "Grant backup", + "name": "Grantrw backup", "event": [ { "listen": "test", @@ -61563,7 +63741,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;backup\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;backup\"\n}" }, "description": "" }, @@ -61628,7 +63806,7 @@ "response": [] }, { - "name": "Grant options", + "name": "Grantrw options", "event": [ { "listen": "test", @@ -61679,7 +63857,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;options\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;options\"\n}" }, "description": "" }, @@ -61744,7 +63922,7 @@ "response": [] }, { - "name": "Grant data", + "name": "Grantrw data", "event": [ { "listen": "test", @@ -61795,7 +63973,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;data\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;data\"\n}" }, "description": "" }, @@ -61860,7 +64038,7 @@ "response": [] }, { - "name": "Grant images", + "name": "Grantrw images", "event": [ { "listen": "test", @@ -61911,7 +64089,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;images\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;parameters;images\"\n}" }, "description": "" }, @@ -61976,7 +64154,7 @@ "response": [] }, { - "name": "Grant extensions", + "name": "Grantrw extensions", "event": [ { "listen": "test", @@ -62027,7 +64205,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions\"\n}" }, "description": "" }, @@ -62092,7 +64270,7 @@ "response": [] }, { - "name": "Grant modules", + "name": "Grantrw modules", "event": [ { "listen": "test", @@ -62143,7 +64321,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;modules\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;modules\"\n}" }, "description": "" }, @@ -62208,7 +64386,7 @@ "response": [] }, { - "name": "Grant widgets", + "name": "Grantrw widgets", "event": [ { "listen": "test", @@ -62259,7 +64437,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;widgets\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;extensions;widgets\"\n}" }, "description": "" }, @@ -62324,7 +64502,7 @@ "response": [] }, { - "name": "Grant ACL", + "name": "Grantrw ACL", "event": [ { "listen": "test", @@ -62375,7 +64553,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL\"\n}" }, "description": "" }, @@ -62440,7 +64618,7 @@ "response": [] }, { - "name": "Grant access groups", + "name": "Grantrw access groups", "event": [ { "listen": "test", @@ -62491,7 +64669,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;access groups\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;access groups\"\n}" }, "description": "" }, @@ -62556,7 +64734,7 @@ "response": [] }, { - "name": "Grant menus access", + "name": "Grantrw menus access", "event": [ { "listen": "test", @@ -62607,7 +64785,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;menus access\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;menus access\"\n}" }, "description": "" }, @@ -62672,7 +64850,7 @@ "response": [] }, { - "name": "Grant resources access", + "name": "Grantrw resources access", "event": [ { "listen": "test", @@ -62723,7 +64901,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;resources access\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;resources access\"\n}" }, "description": "" }, @@ -62788,7 +64966,7 @@ "response": [] }, { - "name": "Grant actions access", + "name": "Grantrw actions access", "event": [ { "listen": "test", @@ -62839,7 +65017,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;actions access\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;actions access\"\n}" }, "description": "" }, @@ -62904,7 +65082,7 @@ "response": [] }, { - "name": "Grant reload ACL", + "name": "Grantrw reload ACL", "event": [ { "listen": "test", @@ -62955,7 +65133,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;reload ACL\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;ACL;reload ACL\"\n}" }, "description": "" }, @@ -63020,7 +65198,7 @@ "response": [] }, { - "name": "Grant logs", + "name": "Grantrw logs", "event": [ { "listen": "test", @@ -63071,7 +65249,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs\"\n}" }, "description": "" }, @@ -63136,7 +65314,7 @@ "response": [] }, { - "name": "Grant visualisation", + "name": "Grantrw visualisation", "event": [ { "listen": "test", @@ -63187,7 +65365,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs;visualisation\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;logs;visualisation\"\n}" }, "description": "" }, @@ -63252,7 +65430,7 @@ "response": [] }, { - "name": "Grant sessions", + "name": "Grantrw sessions", "event": [ { "listen": "test", @@ -63303,7 +65481,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;sessions\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;sessions\"\n}" }, "description": "" }, @@ -63368,7 +65546,7 @@ "response": [] }, { - "name": "Grant server status", + "name": "Grantrw server status", "event": [ { "listen": "test", @@ -63419,7 +65597,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status\"\n}" }, "description": "" }, @@ -63484,7 +65662,7 @@ "response": [] }, { - "name": "Grant databases", + "name": "Grantrw databases", "event": [ { "listen": "test", @@ -63535,7 +65713,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status;databases\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;server status;databases\"\n}" }, "description": "" }, @@ -63600,7 +65778,7 @@ "response": [] }, { - "name": "Grant about (admin)", + "name": "Grantrw about (admin)", "event": [ { "listen": "test", @@ -63651,7 +65829,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about\"\n}" }, "description": "" }, @@ -63716,7 +65894,7 @@ "response": [] }, { - "name": "Grant about (about)", + "name": "Grantrw about (about)", "event": [ { "listen": "test", @@ -63767,7 +65945,7 @@ ], "body": { "mode": "raw", - "raw": "{\n \"action\": \"grant\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about;about\"\n}" + "raw": "{\n \"action\": \"grantrw\",\n \"object\": \"aclmenu\",\n \"values\": \"{{aclmenu_name}};administration;about;about\"\n}" }, "description": "" }, From e5510628b0839d1b886c21a93d94d3f5d2b632d5 Mon Sep 17 00:00:00 2001 From: Kevin Duret Date: Wed, 27 Sep 2017 17:48:45 +0200 Subject: [PATCH 16/16] text(api): get postman environment from another branch --- .../rest_api.postman_environment.json | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/tests/rest_api/rest_api.postman_environment.json b/tests/rest_api/rest_api.postman_environment.json index fbf2f7bcdf4..7f6dc5656f1 100644 --- a/tests/rest_api/rest_api.postman_environment.json +++ b/tests/rest_api/rest_api.postman_environment.json @@ -89,7 +89,7 @@ { "enabled": true, "key": "command_line", - "value": "$USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1", + "value": "$USER1$/check_icmp -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1", "type": "text" }, { @@ -1319,7 +1319,7 @@ { "enabled": true, "key": "gmt_value", - "value": "2", + "value": "Europe/Paris", "type": "text" }, { @@ -3085,6 +3085,36 @@ "key": "mib_path", "value": "/usr/share/centreon/IF-MIB.txt", "type": "text" + }, + { + "enabled": true, + "key": "service_contact_additive_inheritance", + "value": "1", + "type": "text" + }, + { + "enabled": true, + "key": "service_cg_additive_inheritance", + "value": "1", + "type": "text" + }, + { + "enabled": true, + "key": "hgservice_contact_additive_inheritance", + "value": "1", + "type": "text" + }, + { + "enabled": true, + "key": "hgservice_cg_additive_inheritance", + "value": "1", + "type": "text" + }, + { + "enabled": true, + "key": "my_limit", + "value": "10", + "type": "text" } ], "timestamp": 1497354245340,