Lattice Hub 文档
HTTP OpenAPI治理

熔断

熔断规则与 release。

熔断规则与 release。

默认 Base URL:http://127.0.0.1:8090。管理面接口需 Authorization(登录返回的 token)。

熔断

熔断:查询、创建/更新、删除与 releases(发布 / 回滚 / 停灰度)。body 为规则数组;字段以 specification 为准。

GET/naming/v1/circuitbreakers需要鉴权

查询熔断

分页查询熔断。

  • Authorizationheader · string必填

    登录返回的 token。

  • idquery · string可选

    按 ID。

  • namequery · string可选

    按名称。

  • namespacequery · string可选

    按命名空间。

  • servicequery · string可选

    按服务。

  • enablequery · bool可选

    是否启用。

  • offsetquery · integer可选

    偏移,默认 0。

  • limitquery · integer可选

    分页大小,常见上限 100。

请求示例
curl -sS 'http://127.0.0.1:8090/naming/v1/circuitbreakers?limit=20' \
  -H "Authorization: $TOKEN"
响应示例
{
  "code": 200000,
  "info": "execute success",
  "data": [{ "id": "...", "name": "demo", "enable": true }]
}
GET/naming/v1/circuitbreakers/detail需要鉴权

查询熔断详情

按 id 等条件查单条详情。

  • Authorizationheader · string必填

    登录返回的 token。

  • idquery · string可选

    按 ID。

  • namequery · string可选

    按名称。

  • namespacequery · string可选

    按命名空间。

  • servicequery · string可选

    按服务。

  • enablequery · bool可选

    是否启用。

  • offsetquery · integer可选

    偏移,默认 0。

  • limitquery · integer可选

    分页大小,常见上限 100。

请求示例
curl -sS 'http://127.0.0.1:8090/naming/v1/circuitbreakers/detail?id=<id>' \
  -H "Authorization: $TOKEN"
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
POST/naming/v1/circuitbreakers需要鉴权

创建熔断

写接口 body 多为 protobuf 消息数组;下列为单条对象字段(见 specification)。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · CircuitBreakerRule[]必填

    请求体为 CircuitBreakerRule 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。

  • idbody · string可选

    id

  • namebody · string必填

    rule name

  • enablebody · bool可选

    enable this router

  • descriptionbody · string可选

    description simple description rules

  • levelbody · enum(Level)可选

    the circuitbreaking level 枚举:UNKNOWN | SERVICE | METHOD | GROUP | INSTANCE

  • rule_matcherbody · RuleMatcher可选

    match condition for this rule

    • sourcebody · SourceService可选

      source

      • servicebody · string可选

        Main tuning service and namespace

      • namespacebody · string可选

        namespace

    • destinationbody · DestinationService可选

      destination

      • servicebody · string可选

        Main tuning service and namespace

      • namespacebody · string可选

        namespace

  • block_configsbody · CircuitBreakerPolicy[]可选

    block_configs

    • block_configbody · BlockConfig可选

      blocking strategy

      • namebody · string可选

        name

      • apisbody · API[]可选

        apis

        • protocolbody · string可选

          API的协议,*或者为空代表全部

        • methodbody · string可选

          API的方法,*或者为空代表全部

        • pathbody · MatchString可选

          API的路径,支持多种匹配方式

          • typebody · enum(MatchStringType)可选

            type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

          • valuebody · string可选

            value

          • value_typebody · enum(ValueType)可选

            value_type 枚举:TEXT | PARAMETER

      • error_conditionsbody · ErrorCondition[]可选

        error_conditions

        • input_typebody · enum(InputType)可选

          input_type 枚举:UNKNOWN | RET_CODE | DELAY

        • conditionbody · MatchString可选

          condition

          • typebody · enum(MatchStringType)可选

            type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

          • valuebody · string可选

            value

          • value_typebody · enum(ValueType)可选

            value_type 枚举:TEXT | PARAMETER

      • trigger_conditionsbody · TriggerCondition[]可选

        trigger_conditions

        • trigger_typebody · enum(TriggerType)可选

          trigger_type 枚举:UNKNOWN | ERROR_RATE | CONSECUTIVE_ERROR

        • error_countbody · uint32可选

          error_count

        • error_percentbody · uint32可选

          error_percent

        • intervalbody · uint32可选

          interval

        • minimum_requestbody · uint32可选

          minimum_request

      • regex_separatebody · bool可选

        whether regex API matches are counted separately

    • max_ejection_percentbody · uint32可选

      the maximum % of an upstream cluster that can be ejected

    • recoverConditionbody · RecoverCondition可选

      recover condition to make resource open to close

      • sleep_windowbody · uint32可选

        seconds from open to half-open

      • consecutiveSuccessbody · uint32可选

        consecutive success request to recover

    • faultDetectConfigbody · FaultDetectConfig可选

      fault detection enable config

      • enablebody · bool可选

        enable

    • fallbackConfigbody · FallbackConfig可选

      fall back configuration

      • enablebody · bool可选

        enable

      • responsebody · FallbackResponse可选

        response

        • codebody · string可选

          code

        • headersbody · MessageHeader[]可选

          headers

          • keybody · string可选

            key

          • valuebody · string可选

            value

        • bodybody · string可选

          body

  • prioritybody · uint32可选

    priority rules priority

  • metadatabody · map<string,string>可选

    metadata

  • namespacebody · string必填

    namespace identifies the environment that owns this rule.

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • circuitBreakerRulebody · CircuitBreakerRule可选

    返回中的 CircuitBreakerRule 实体字段(批量接口在 responses[] 内)。

    • idbody · string可选

      id

    • namebody · string可选

      rule name

    • enablebody · bool可选

      enable this router

    • revisionbody · string可选

      revision routing version

    • ctimebody · string可选

      ctime create time of the rules

    • mtimebody · string可选

      mtime modify time of the rules

    • etimebody · string可选

      etime enable time of the rules

    • descriptionbody · string可选

      description simple description rules

    • levelbody · enum(Level)可选

      the circuitbreaking level 枚举:UNKNOWN | SERVICE | METHOD | GROUP | INSTANCE

    • rule_matcherbody · RuleMatcher可选

      match condition for this rule

      • sourcebody · SourceService可选

        source

        • servicebody · string可选

          Main tuning service and namespace

        • namespacebody · string可选

          namespace

      • destinationbody · DestinationService可选

        destination

        • servicebody · string可选

          Main tuning service and namespace

        • namespacebody · string可选

          namespace

    • block_configsbody · CircuitBreakerPolicy[]可选

      block_configs

      • block_configbody · BlockConfig可选

        blocking strategy

        • namebody · string可选

          name

        • apisbody · API[]可选

          apis

          • protocolbody · string可选

            API的协议,*或者为空代表全部

          • methodbody · string可选

            API的方法,*或者为空代表全部

          • pathbody · MatchString可选

            API的路径,支持多种匹配方式

            • typebody · enum(MatchStringType)可选

              type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

            • valuebody · string可选

              value

            • value_typebody · enum(ValueType)可选

              value_type 枚举:TEXT | PARAMETER

        • error_conditionsbody · ErrorCondition[]可选

          error_conditions

          • input_typebody · enum(InputType)可选

            input_type 枚举:UNKNOWN | RET_CODE | DELAY

          • conditionbody · MatchString可选

            condition

            • typebody · enum(MatchStringType)可选

              type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

            • valuebody · string可选

              value

            • value_typebody · enum(ValueType)可选

              value_type 枚举:TEXT | PARAMETER

        • trigger_conditionsbody · TriggerCondition[]可选

          trigger_conditions

          • trigger_typebody · enum(TriggerType)可选

            trigger_type 枚举:UNKNOWN | ERROR_RATE | CONSECUTIVE_ERROR

          • error_countbody · uint32可选

            error_count

          • error_percentbody · uint32可选

            error_percent

          • intervalbody · uint32可选

            interval

          • minimum_requestbody · uint32可选

            minimum_request

        • regex_separatebody · bool可选

          whether regex API matches are counted separately

      • max_ejection_percentbody · uint32可选

        the maximum % of an upstream cluster that can be ejected

      • recoverConditionbody · RecoverCondition可选

        recover condition to make resource open to close

        • sleep_windowbody · uint32可选

          seconds from open to half-open

        • consecutiveSuccessbody · uint32可选

          consecutive success request to recover

      • faultDetectConfigbody · FaultDetectConfig可选

        fault detection enable config

        • enablebody · bool可选

          enable

      • fallbackConfigbody · FallbackConfig可选

        fall back configuration

        • enablebody · bool可选

          enable

        • responsebody · FallbackResponse可选

          response

          • codebody · string可选

            code

          • headersbody · MessageHeader[]可选

            headers

            • keybody · string可选

              key

            • valuebody · string可选

              value

          • bodybody · string可选

            body

    • prioritybody · uint32可选

      priority rules priority

    • metadatabody · map<string,string>可选

      metadata

    • editablebody · bool可选

      操作标志位

    • deleteablebody · bool可选

      deleteable

    • namespacebody · string可选

      namespace identifies the environment that owns this rule.

请求示例
curl -sS -X POST 'http://127.0.0.1:8090/naming/v1/circuitbreakers' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"name":"demo-cb","enable":true}]'
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
PUT/naming/v1/circuitbreakers需要鉴权

更新熔断

更新规则;body 为数组。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · CircuitBreakerRule[]必填

    请求体为 CircuitBreakerRule 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。

  • idbody · string可选

    id

  • namebody · string可选

    rule name

  • enablebody · bool可选

    enable this router

  • descriptionbody · string可选

    description simple description rules

  • levelbody · enum(Level)可选

    the circuitbreaking level 枚举:UNKNOWN | SERVICE | METHOD | GROUP | INSTANCE

  • rule_matcherbody · RuleMatcher可选

    match condition for this rule

    • sourcebody · SourceService可选

      source

      • servicebody · string可选

        Main tuning service and namespace

      • namespacebody · string可选

        namespace

    • destinationbody · DestinationService可选

      destination

      • servicebody · string可选

        Main tuning service and namespace

      • namespacebody · string可选

        namespace

  • block_configsbody · CircuitBreakerPolicy[]可选

    block_configs

    • block_configbody · BlockConfig可选

      blocking strategy

      • namebody · string可选

        name

      • apisbody · API[]可选

        apis

        • protocolbody · string可选

          API的协议,*或者为空代表全部

        • methodbody · string可选

          API的方法,*或者为空代表全部

        • pathbody · MatchString可选

          API的路径,支持多种匹配方式

          • typebody · enum(MatchStringType)可选

            type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

          • valuebody · string可选

            value

          • value_typebody · enum(ValueType)可选

            value_type 枚举:TEXT | PARAMETER

      • error_conditionsbody · ErrorCondition[]可选

        error_conditions

        • input_typebody · enum(InputType)可选

          input_type 枚举:UNKNOWN | RET_CODE | DELAY

        • conditionbody · MatchString可选

          condition

          • typebody · enum(MatchStringType)可选

            type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

          • valuebody · string可选

            value

          • value_typebody · enum(ValueType)可选

            value_type 枚举:TEXT | PARAMETER

      • trigger_conditionsbody · TriggerCondition[]可选

        trigger_conditions

        • trigger_typebody · enum(TriggerType)可选

          trigger_type 枚举:UNKNOWN | ERROR_RATE | CONSECUTIVE_ERROR

        • error_countbody · uint32可选

          error_count

        • error_percentbody · uint32可选

          error_percent

        • intervalbody · uint32可选

          interval

        • minimum_requestbody · uint32可选

          minimum_request

      • regex_separatebody · bool可选

        whether regex API matches are counted separately

    • max_ejection_percentbody · uint32可选

      the maximum % of an upstream cluster that can be ejected

    • recoverConditionbody · RecoverCondition可选

      recover condition to make resource open to close

      • sleep_windowbody · uint32可选

        seconds from open to half-open

      • consecutiveSuccessbody · uint32可选

        consecutive success request to recover

    • faultDetectConfigbody · FaultDetectConfig可选

      fault detection enable config

      • enablebody · bool可选

        enable

    • fallbackConfigbody · FallbackConfig可选

      fall back configuration

      • enablebody · bool可选

        enable

      • responsebody · FallbackResponse可选

        response

        • codebody · string可选

          code

        • headersbody · MessageHeader[]可选

          headers

          • keybody · string可选

            key

          • valuebody · string可选

            value

        • bodybody · string可选

          body

  • prioritybody · uint32可选

    priority rules priority

  • metadatabody · map<string,string>可选

    metadata

  • namespacebody · string可选

    namespace identifies the environment that owns this rule.

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • circuitBreakerRulebody · CircuitBreakerRule可选

    返回中的 CircuitBreakerRule 实体字段(批量接口在 responses[] 内)。

    • idbody · string可选

      id

    • namebody · string可选

      rule name

    • enablebody · bool可选

      enable this router

    • revisionbody · string可选

      revision routing version

    • ctimebody · string可选

      ctime create time of the rules

    • mtimebody · string可选

      mtime modify time of the rules

    • etimebody · string可选

      etime enable time of the rules

    • descriptionbody · string可选

      description simple description rules

    • levelbody · enum(Level)可选

      the circuitbreaking level 枚举:UNKNOWN | SERVICE | METHOD | GROUP | INSTANCE

    • rule_matcherbody · RuleMatcher可选

      match condition for this rule

      • sourcebody · SourceService可选

        source

        • servicebody · string可选

          Main tuning service and namespace

        • namespacebody · string可选

          namespace

      • destinationbody · DestinationService可选

        destination

        • servicebody · string可选

          Main tuning service and namespace

        • namespacebody · string可选

          namespace

    • block_configsbody · CircuitBreakerPolicy[]可选

      block_configs

      • block_configbody · BlockConfig可选

        blocking strategy

        • namebody · string可选

          name

        • apisbody · API[]可选

          apis

          • protocolbody · string可选

            API的协议,*或者为空代表全部

          • methodbody · string可选

            API的方法,*或者为空代表全部

          • pathbody · MatchString可选

            API的路径,支持多种匹配方式

            • typebody · enum(MatchStringType)可选

              type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

            • valuebody · string可选

              value

            • value_typebody · enum(ValueType)可选

              value_type 枚举:TEXT | PARAMETER

        • error_conditionsbody · ErrorCondition[]可选

          error_conditions

          • input_typebody · enum(InputType)可选

            input_type 枚举:UNKNOWN | RET_CODE | DELAY

          • conditionbody · MatchString可选

            condition

            • typebody · enum(MatchStringType)可选

              type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

            • valuebody · string可选

              value

            • value_typebody · enum(ValueType)可选

              value_type 枚举:TEXT | PARAMETER

        • trigger_conditionsbody · TriggerCondition[]可选

          trigger_conditions

          • trigger_typebody · enum(TriggerType)可选

            trigger_type 枚举:UNKNOWN | ERROR_RATE | CONSECUTIVE_ERROR

          • error_countbody · uint32可选

            error_count

          • error_percentbody · uint32可选

            error_percent

          • intervalbody · uint32可选

            interval

          • minimum_requestbody · uint32可选

            minimum_request

        • regex_separatebody · bool可选

          whether regex API matches are counted separately

      • max_ejection_percentbody · uint32可选

        the maximum % of an upstream cluster that can be ejected

      • recoverConditionbody · RecoverCondition可选

        recover condition to make resource open to close

        • sleep_windowbody · uint32可选

          seconds from open to half-open

        • consecutiveSuccessbody · uint32可选

          consecutive success request to recover

      • faultDetectConfigbody · FaultDetectConfig可选

        fault detection enable config

        • enablebody · bool可选

          enable

      • fallbackConfigbody · FallbackConfig可选

        fall back configuration

        • enablebody · bool可选

          enable

        • responsebody · FallbackResponse可选

          response

          • codebody · string可选

            code

          • headersbody · MessageHeader[]可选

            headers

            • keybody · string可选

              key

            • valuebody · string可选

              value

          • bodybody · string可选

            body

    • prioritybody · uint32可选

      priority rules priority

    • metadatabody · map<string,string>可选

      metadata

    • editablebody · bool可选

      操作标志位

    • deleteablebody · bool可选

      deleteable

    • namespacebody · string可选

      namespace identifies the environment that owns this rule.

请求示例
curl -sS -X PUT 'http://127.0.0.1:8090/naming/v1/circuitbreakers' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"name":"demo-cb","enable":true}]'
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
POST/naming/v1/circuitbreakers/delete需要鉴权

删除熔断

删除规则;body 为含 id 的数组。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · CircuitBreakerRule[]必填

    请求体为 CircuitBreakerRule 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。

  • idbody · string可选

    id

  • namebody · string可选

    rule name

  • enablebody · bool可选

    enable this router

  • descriptionbody · string可选

    description simple description rules

  • levelbody · enum(Level)可选

    the circuitbreaking level 枚举:UNKNOWN | SERVICE | METHOD | GROUP | INSTANCE

  • rule_matcherbody · RuleMatcher可选

    match condition for this rule

    • sourcebody · SourceService可选

      source

      • servicebody · string可选

        Main tuning service and namespace

      • namespacebody · string可选

        namespace

    • destinationbody · DestinationService可选

      destination

      • servicebody · string可选

        Main tuning service and namespace

      • namespacebody · string可选

        namespace

  • block_configsbody · CircuitBreakerPolicy[]可选

    block_configs

    • block_configbody · BlockConfig可选

      blocking strategy

      • namebody · string可选

        name

      • apisbody · API[]可选

        apis

        • protocolbody · string可选

          API的协议,*或者为空代表全部

        • methodbody · string可选

          API的方法,*或者为空代表全部

        • pathbody · MatchString可选

          API的路径,支持多种匹配方式

          • typebody · enum(MatchStringType)可选

            type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

          • valuebody · string可选

            value

          • value_typebody · enum(ValueType)可选

            value_type 枚举:TEXT | PARAMETER

      • error_conditionsbody · ErrorCondition[]可选

        error_conditions

        • input_typebody · enum(InputType)可选

          input_type 枚举:UNKNOWN | RET_CODE | DELAY

        • conditionbody · MatchString可选

          condition

          • typebody · enum(MatchStringType)可选

            type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

          • valuebody · string可选

            value

          • value_typebody · enum(ValueType)可选

            value_type 枚举:TEXT | PARAMETER

      • trigger_conditionsbody · TriggerCondition[]可选

        trigger_conditions

        • trigger_typebody · enum(TriggerType)可选

          trigger_type 枚举:UNKNOWN | ERROR_RATE | CONSECUTIVE_ERROR

        • error_countbody · uint32可选

          error_count

        • error_percentbody · uint32可选

          error_percent

        • intervalbody · uint32可选

          interval

        • minimum_requestbody · uint32可选

          minimum_request

      • regex_separatebody · bool可选

        whether regex API matches are counted separately

    • max_ejection_percentbody · uint32可选

      the maximum % of an upstream cluster that can be ejected

    • recoverConditionbody · RecoverCondition可选

      recover condition to make resource open to close

      • sleep_windowbody · uint32可选

        seconds from open to half-open

      • consecutiveSuccessbody · uint32可选

        consecutive success request to recover

    • faultDetectConfigbody · FaultDetectConfig可选

      fault detection enable config

      • enablebody · bool可选

        enable

    • fallbackConfigbody · FallbackConfig可选

      fall back configuration

      • enablebody · bool可选

        enable

      • responsebody · FallbackResponse可选

        response

        • codebody · string可选

          code

        • headersbody · MessageHeader[]可选

          headers

          • keybody · string可选

            key

          • valuebody · string可选

            value

        • bodybody · string可选

          body

  • prioritybody · uint32可选

    priority rules priority

  • metadatabody · map<string,string>可选

    metadata

  • namespacebody · string可选

    namespace identifies the environment that owns this rule.

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • circuitBreakerRulebody · CircuitBreakerRule可选

    返回中的 CircuitBreakerRule 实体字段(批量接口在 responses[] 内)。

    • idbody · string可选

      id

    • namebody · string可选

      rule name

    • enablebody · bool可选

      enable this router

    • revisionbody · string可选

      revision routing version

    • ctimebody · string可选

      ctime create time of the rules

    • mtimebody · string可选

      mtime modify time of the rules

    • etimebody · string可选

      etime enable time of the rules

    • descriptionbody · string可选

      description simple description rules

    • levelbody · enum(Level)可选

      the circuitbreaking level 枚举:UNKNOWN | SERVICE | METHOD | GROUP | INSTANCE

    • rule_matcherbody · RuleMatcher可选

      match condition for this rule

      • sourcebody · SourceService可选

        source

        • servicebody · string可选

          Main tuning service and namespace

        • namespacebody · string可选

          namespace

      • destinationbody · DestinationService可选

        destination

        • servicebody · string可选

          Main tuning service and namespace

        • namespacebody · string可选

          namespace

    • block_configsbody · CircuitBreakerPolicy[]可选

      block_configs

      • block_configbody · BlockConfig可选

        blocking strategy

        • namebody · string可选

          name

        • apisbody · API[]可选

          apis

          • protocolbody · string可选

            API的协议,*或者为空代表全部

          • methodbody · string可选

            API的方法,*或者为空代表全部

          • pathbody · MatchString可选

            API的路径,支持多种匹配方式

            • typebody · enum(MatchStringType)可选

              type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

            • valuebody · string可选

              value

            • value_typebody · enum(ValueType)可选

              value_type 枚举:TEXT | PARAMETER

        • error_conditionsbody · ErrorCondition[]可选

          error_conditions

          • input_typebody · enum(InputType)可选

            input_type 枚举:UNKNOWN | RET_CODE | DELAY

          • conditionbody · MatchString可选

            condition

            • typebody · enum(MatchStringType)可选

              type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

            • valuebody · string可选

              value

            • value_typebody · enum(ValueType)可选

              value_type 枚举:TEXT | PARAMETER

        • trigger_conditionsbody · TriggerCondition[]可选

          trigger_conditions

          • trigger_typebody · enum(TriggerType)可选

            trigger_type 枚举:UNKNOWN | ERROR_RATE | CONSECUTIVE_ERROR

          • error_countbody · uint32可选

            error_count

          • error_percentbody · uint32可选

            error_percent

          • intervalbody · uint32可选

            interval

          • minimum_requestbody · uint32可选

            minimum_request

        • regex_separatebody · bool可选

          whether regex API matches are counted separately

      • max_ejection_percentbody · uint32可选

        the maximum % of an upstream cluster that can be ejected

      • recoverConditionbody · RecoverCondition可选

        recover condition to make resource open to close

        • sleep_windowbody · uint32可选

          seconds from open to half-open

        • consecutiveSuccessbody · uint32可选

          consecutive success request to recover

      • faultDetectConfigbody · FaultDetectConfig可选

        fault detection enable config

        • enablebody · bool可选

          enable

      • fallbackConfigbody · FallbackConfig可选

        fall back configuration

        • enablebody · bool可选

          enable

        • responsebody · FallbackResponse可选

          response

          • codebody · string可选

            code

          • headersbody · MessageHeader[]可选

            headers

            • keybody · string可选

              key

            • valuebody · string可选

              value

          • bodybody · string可选

            body

    • prioritybody · uint32可选

      priority rules priority

    • metadatabody · map<string,string>可选

      metadata

    • editablebody · bool可选

      操作标志位

    • deleteablebody · bool可选

      deleteable

    • namespacebody · string可选

      namespace identifies the environment that owns this rule.

请求示例
curl -sS -X POST 'http://127.0.0.1:8090/naming/v1/circuitbreakers/delete' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"id":"<rule-id>"}]'
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
POST/naming/v1/circuitbreakers/releases需要鉴权

发布熔断

发布 release,使客户端读到 active 视图。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · RuleRelease[]必填

    请求体为 RuleRelease 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。

  • idbody · string可选

    id

  • rule_idbody · string可选

    rule_id

  • rule_namebody · string可选

    rule_name

  • release_namebody · string可选

    release_name

  • descriptionbody · string可选

    description

  • release_typebody · string可选

    release_type

  • client_labelsbody · ClientLabel[]可选

    client_labels

    • keybody · string可选

      key

    • valuebody · MatchString可选

      value

      • typebody · enum(MatchStringType)可选

        type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

      • valuebody · string可选

        value

      • value_typebody · enum(ValueType)可选

        value_type 枚举:TEXT | PARAMETER

  • versionbody · uint64可选

    version

  • resourcebody · enum(RuleType)可选

    resource 枚举:

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • ruleReleasebody · RuleRelease可选

    返回中的 RuleRelease 实体字段(批量接口在 responses[] 内)。

    • idbody · string可选

      id

    • rule_idbody · string可选

      rule_id

    • rule_namebody · string可选

      rule_name

    • release_namebody · string可选

      release_name

    • descriptionbody · string可选

      description

    • release_typebody · string可选

      release_type

    • client_labelsbody · ClientLabel[]可选

      client_labels

      • keybody · string可选

        key

      • valuebody · MatchString可选

        value

        • typebody · enum(MatchStringType)可选

          type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

        • valuebody · string可选

          value

        • value_typebody · enum(ValueType)可选

          value_type 枚举:TEXT | PARAMETER

    • versionbody · uint64可选

      version

    • resourcebody · enum(RuleType)可选

      resource 枚举:

    • activebody · bool可选

      active

    • ctimebody · string可选

      ctime

    • mtimebody · string可选

      mtime

请求示例
curl -sS -X POST 'http://127.0.0.1:8090/naming/v1/circuitbreakers/releases' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"id":"<rule-id>","release_type":"normal"}]'
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
GET/naming/v1/circuitbreakers/releases需要鉴权

查询熔断发布

查询已发布版本。

  • Authorizationheader · string必填

    登录返回的 token。

  • idquery · string可选

    规则 ID。

  • limitquery · integer可选

    分页大小。

请求示例
curl -sS 'http://127.0.0.1:8090/naming/v1/circuitbreakers/releases?limit=20' \
  -H "Authorization: $TOKEN"
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
PUT/naming/v1/circuitbreakers/releases/rollback需要鉴权

回滚熔断

回滚到指定 release。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · RuleRelease[]必填

    请求体为 RuleRelease 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。

  • idbody · string可选

    id

  • rule_idbody · string可选

    rule_id

  • rule_namebody · string可选

    rule_name

  • release_namebody · string可选

    release_name

  • descriptionbody · string可选

    description

  • release_typebody · string可选

    release_type

  • client_labelsbody · ClientLabel[]可选

    client_labels

    • keybody · string可选

      key

    • valuebody · MatchString可选

      value

      • typebody · enum(MatchStringType)可选

        type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

      • valuebody · string可选

        value

      • value_typebody · enum(ValueType)可选

        value_type 枚举:TEXT | PARAMETER

  • versionbody · uint64可选

    version

  • resourcebody · enum(RuleType)可选

    resource 枚举:

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • ruleReleasebody · RuleRelease可选

    返回中的 RuleRelease 实体字段(批量接口在 responses[] 内)。

    • idbody · string可选

      id

    • rule_idbody · string可选

      rule_id

    • rule_namebody · string可选

      rule_name

    • release_namebody · string可选

      release_name

    • descriptionbody · string可选

      description

    • release_typebody · string可选

      release_type

    • client_labelsbody · ClientLabel[]可选

      client_labels

      • keybody · string可选

        key

      • valuebody · MatchString可选

        value

        • typebody · enum(MatchStringType)可选

          type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

        • valuebody · string可选

          value

        • value_typebody · enum(ValueType)可选

          value_type 枚举:TEXT | PARAMETER

    • versionbody · uint64可选

      version

    • resourcebody · enum(RuleType)可选

      resource 枚举:

    • activebody · bool可选

      active

    • ctimebody · string可选

      ctime

    • mtimebody · string可选

      mtime

请求示例
curl -sS -X PUT 'http://127.0.0.1:8090/naming/v1/circuitbreakers/releases/rollback' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"id":"<rule-id>"}]'
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
PUT/naming/v1/circuitbreakers/releases/stopbeta需要鉴权

停止熔断灰度

停止灰度 release。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · RuleRelease[]必填

    请求体为 RuleRelease 的 JSON 数组:[{...}, ...]。下列字段为数组中单条对象的完整字段(含嵌套)。

  • idbody · string可选

    id

  • rule_idbody · string可选

    rule_id

  • rule_namebody · string可选

    rule_name

  • release_namebody · string可选

    release_name

  • descriptionbody · string可选

    description

  • release_typebody · string可选

    release_type

  • client_labelsbody · ClientLabel[]可选

    client_labels

    • keybody · string可选

      key

    • valuebody · MatchString可选

      value

      • typebody · enum(MatchStringType)可选

        type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

      • valuebody · string可选

        value

      • value_typebody · enum(ValueType)可选

        value_type 枚举:TEXT | PARAMETER

  • versionbody · uint64可选

    version

  • resourcebody · enum(RuleType)可选

    resource 枚举:

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • ruleReleasebody · RuleRelease可选

    返回中的 RuleRelease 实体字段(批量接口在 responses[] 内)。

    • idbody · string可选

      id

    • rule_idbody · string可选

      rule_id

    • rule_namebody · string可选

      rule_name

    • release_namebody · string可选

      release_name

    • descriptionbody · string可选

      description

    • release_typebody · string可选

      release_type

    • client_labelsbody · ClientLabel[]可选

      client_labels

      • keybody · string可选

        key

      • valuebody · MatchString可选

        value

        • typebody · enum(MatchStringType)可选

          type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

        • valuebody · string可选

          value

        • value_typebody · enum(ValueType)可选

          value_type 枚举:TEXT | PARAMETER

    • versionbody · uint64可选

      version

    • resourcebody · enum(RuleType)可选

      resource 枚举:

    • activebody · bool可选

      active

    • ctimebody · string可选

      ctime

    • mtimebody · string可选

      mtime

请求示例
curl -sS -X PUT 'http://127.0.0.1:8090/naming/v1/circuitbreakers/releases/stopbeta' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"id":"<rule-id>"}]'
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
POST/naming/v1/circuitbreakers/releases/delete需要鉴权

删除发布

删除发布。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · RuleRelease[]必填

    请求体为 RuleRelease 的 JSON 数组;下列为单条字段。

  • idbody · string可选

    id

  • rule_idbody · string可选

    rule_id

  • rule_namebody · string可选

    rule_name

  • release_namebody · string可选

    release_name

  • descriptionbody · string可选

    description

  • release_typebody · string可选

    release_type

  • client_labelsbody · ClientLabel[]可选

    client_labels

    • keybody · string可选

      key

    • valuebody · MatchString可选

      value

      • typebody · enum(MatchStringType)可选

        type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

      • valuebody · string可选

        value

      • value_typebody · enum(ValueType)可选

        value_type 枚举:TEXT | PARAMETER

  • versionbody · uint64可选

    version

  • resourcebody · enum(RuleType)可选

    resource 枚举:

  • codebody · uint32必填

    业务码。

  • infobody · string可选

    提示信息。

  • RuleReleasebody · RuleRelease可选

    实体字段。

    • idbody · string可选

      id

    • rule_idbody · string可选

      rule_id

    • rule_namebody · string可选

      rule_name

    • release_namebody · string可选

      release_name

    • descriptionbody · string可选

      description

    • release_typebody · string可选

      release_type

    • client_labelsbody · ClientLabel[]可选

      client_labels

      • keybody · string可选

        key

      • valuebody · MatchString可选

        value

        • typebody · enum(MatchStringType)可选

          type 枚举:EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE

        • valuebody · string可选

          value

        • value_typebody · enum(ValueType)可选

          value_type 枚举:TEXT | PARAMETER

    • versionbody · uint64可选

      version

    • resourcebody · enum(RuleType)可选

      resource 枚举:

    • activebody · bool可选

      active

    • ctimebody · string可选

      ctime

    • mtimebody · string可选

      mtime

请求示例
curl -sS -X POST 'http://127.0.0.1:8090/naming/v1/circuitbreakers/releases/delete' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[]'
响应示例
{
  "code": 200000,
  "info": "execute success"
}

On this page