src/MonitoringLivestatus.php
public function batchDelete($ids) {
        $requests = [];

        foreach ($ids as $id) {
            $requests[] = [
                'method' => 'monitoring.livestatus.delete',
                'params' => [
                    'id' => $id
                ]
            ];
        }

        $result = $this->api->batchRequest($requests);

        foreach ($result as $tag) {
            // Do not check 'id' because in a batch request it is always NULL:
            if (!array_key_exists('success', $tag) ||
                $tag['success'] !== true) {
                if (array_key_exists('message', $tag)) {
                    throw new RuntimeException(sprintf('Bad result: %s', $tag['message']));
                } else {
                    throw new RuntimeException('Bad result');
                }
            }
        }

        return $this;
    }
public function batchDelete($ids) {
        $requests = [];

        foreach ($ids as $id) {
            $requests[] = [
                'method' => 'monitoring.livestatus.delete',
                'params' => [
                    'id' => $id
                ]
            ];
        }

        $result = $this->api->batchRequest($requests);

        foreach ($result as $tag) {
            // Do not check 'id' because in a batch request it is always NULL:
            if (!array_key_exists('success', $tag) ||
                $tag['success'] !== true) {
                if (array_key_exists('message', $tag)) {
                    throw new RuntimeException(sprintf('Bad result: %s', $tag['message']));
                } else {
                    throw new RuntimeException('Bad result');
                }
            }
        }

        return $this;
    }
public function batchDelete ( $ ids ) { $ requests = [ ] ; foreach ( $ ids as $ id ) { $ requests [ ] = [ 'method' => 'monitoring.livestatus.delete' , 'params' => [ 'id' => $ id ] ] ; } $ result = $ this -> api -> batchRequest ( $ requests ) ; foreach ( $ result as $ tag ) { // Do not check 'id' because in a batch request it is always NULL: if ( ! array_key_exists ( 'success' , $ tag ) || $ tag [ 'success' ] !== true ) { if ( array_key_exists ( 'message' , $ tag ) ) { throw new RuntimeException ( sprintf ( 'Bad result: %s' , $ tag [ 'message' ] ) ) ; } else { throw new RuntimeException ( 'Bad result' ) ; } } } return $ this ; }
Delete one or more monitoring instances be their identifiers

@param array $ids List of identifiers as integers

@return self Returns itself

@throws Exception on error
Delete one or more monitoring instances be their identifiers