public function rename($view, $name)
    {
        if ($view instanceof View) {
            $view = $view->getName();
        }

        $params = [View::ENTRY_NAME => $name];
        $this->getConnection()->put(
            UrlHelper::buildUrl(Urls::URL_VIEW, [$view, self::OPTION_RENAME]),
            $this->json_encode_wrapper($params)
        );

        return true;
    }