类 HistoryController


  • @RestController
    @RequestMapping("/v1/cs/history")
    public class HistoryController
    extends java.lang.Object
    History management controller.
    作者:
    Nacos
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      private void checkHistoryInfoPermission​(ConfigHistoryInfo configHistoryInfo, java.lang.String dataId, java.lang.String group, java.lang.String tenant)
      Check if the input dataId and group match the history config.
      ConfigHistoryInfo getConfigHistoryInfo​(java.lang.String dataId, java.lang.String group, java.lang.String tenant, java.lang.Long nid)
      Query the detailed configuration history information.
      java.util.List<ConfigInfoWrapper> getDataIds​(java.lang.String tenant)
      Query configs list by namespace.
      ConfigHistoryInfo getPreviousConfigHistoryInfo​(java.lang.String dataId, java.lang.String group, java.lang.String tenant, java.lang.Long id)
      Query previous config history information.
      Page<ConfigHistoryInfo> listConfigHistory​(java.lang.String dataId, java.lang.String group, java.lang.String tenant, java.lang.String appName, java.lang.Integer pageNo, java.lang.Integer pageSize, org.springframework.ui.ModelMap modelMap)
      Query the list history config.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

    • 构造器详细资料

      • HistoryController

        public HistoryController()
    • 方法详细资料

      • listConfigHistory

        @GetMapping(params="search=accurate")
        public Page<ConfigHistoryInfo> listConfigHistory​(@RequestParam("dataId")
                                                         java.lang.String dataId,
                                                         @RequestParam("group")
                                                         java.lang.String group,
                                                         @RequestParam(value="tenant",required=false,defaultValue="")
                                                         java.lang.String tenant,
                                                         @RequestParam(value="appName",required=false)
                                                         java.lang.String appName,
                                                         @RequestParam(value="pageNo",required=false)
                                                         java.lang.Integer pageNo,
                                                         @RequestParam(value="pageSize",required=false)
                                                         java.lang.Integer pageSize,
                                                         org.springframework.ui.ModelMap modelMap)
        Query the list history config. notes:
        参数:
        dataId - dataId string value.
        group - group string value.
        tenant - tenant string value.
        appName - appName string value.
        pageNo - pageNo integer value.
        pageSize - pageSize integer value.
        modelMap - modelMap.
        返回:
        the page of history config.
        从以下版本开始:
        2.0.3 add Secured for history config permission check.
      • getConfigHistoryInfo

        @GetMapping
        public ConfigHistoryInfo getConfigHistoryInfo​(@RequestParam("dataId")
                                                      java.lang.String dataId,
                                                      @RequestParam("group")
                                                      java.lang.String group,
                                                      @RequestParam(value="tenant",required=false,defaultValue="")
                                                      java.lang.String tenant,
                                                      @RequestParam("nid")
                                                      java.lang.Long nid)
                                               throws com.alibaba.nacos.auth.exception.AccessException
        Query the detailed configuration history information. notes:
        参数:
        nid - history_config_info nid
        dataId - dataId @since 2.0.3
        group - groupId @since 2.0.3
        tenant - tenantId @since 2.0.3
        返回:
        history config info
        抛出:
        com.alibaba.nacos.auth.exception.AccessException
        从以下版本开始:
        2.0.3 add Secured, dataId, groupId and tenant for history config permission check.
      • checkHistoryInfoPermission

        private void checkHistoryInfoPermission​(ConfigHistoryInfo configHistoryInfo,
                                                java.lang.String dataId,
                                                java.lang.String group,
                                                java.lang.String tenant)
                                         throws com.alibaba.nacos.auth.exception.AccessException
        Check if the input dataId and group match the history config.
        参数:
        configHistoryInfo - history config.
        dataId - dataId
        group - group
        tenant - tenant
        抛出:
        com.alibaba.nacos.auth.exception.AccessException - not match exception.
        从以下版本开始:
        2.0.3
      • getPreviousConfigHistoryInfo

        @GetMapping("/previous")
        public ConfigHistoryInfo getPreviousConfigHistoryInfo​(@RequestParam("dataId")
                                                              java.lang.String dataId,
                                                              @RequestParam("group")
                                                              java.lang.String group,
                                                              @RequestParam(value="tenant",required=false,defaultValue="")
                                                              java.lang.String tenant,
                                                              @RequestParam("id")
                                                              java.lang.Long id)
                                                       throws com.alibaba.nacos.auth.exception.AccessException
        Query previous config history information. notes:
        参数:
        id - config_info id
        dataId - dataId @since 2.0.3
        group - groupId @since 2.0.3
        tenant - tenantId @since 2.0.3
        返回:
        history config info
        抛出:
        com.alibaba.nacos.auth.exception.AccessException
        从以下版本开始:
        2.0.3 add Secured, dataId, groupId and tenant for history config permission check., 1.4.0
      • getDataIds

        @GetMapping("/configs")
        public java.util.List<ConfigInfoWrapper> getDataIds​(@RequestParam("tenant")
                                                            java.lang.String tenant)
        Query configs list by namespace.
        参数:
        tenant - config_info namespace
        返回:
        list
        从以下版本开始:
        2.1.1