Lattice Hub 文档
HTTP OpenAPI治理

泳道

泳道分组与规则发布。

泳道分组与规则发布。

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

泳道

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

GET/naming/v1/lane/groups需要鉴权

查询泳道

分页查询泳道。

  • 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/lane/groups?limit=20' \
  -H "Authorization: $TOKEN"
响应示例
{
  "code": 200000,
  "info": "execute success",
  "data": [{ "id": "...", "name": "demo", "enable": true }]
}
GET/naming/v1/lane/groups/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/lane/groups/detail?id=<id>' \
  -H "Authorization: $TOKEN"
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
POST/naming/v1/lane/groups需要鉴权

创建泳道

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

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · LaneGroup[]必填

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

  • idbody · string可选

    泳道组 ID

  • namebody · string必填

    泳道组名称

  • entriesbody · TrafficEntry[]可选

    entries

    • typebody · string可选

      标记流量入口类型 type == "pole.io/gateway/spring-cloud-gateway", 则 selector 为 ServiceGatewaySelector type == "pole.io/service, 则 selector 为 ServiceSelector

    • selectorbody · any可选

      selector(google.protobuf.Any,按策略 unpack)。

  • destinationsbody · DestinationGroup[]可选

    destinations

    • servicebody · string可选

      Templated service and namespace

    • namespacebody · string可选

      namespace

    • labelsbody · map<string,MatchString>可选

      labels

      • typebody · enum(MatchStringType)可选

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

      • valuebody · string可选

        value

      • value_typebody · enum(ValueType)可选

        value_type 枚举:TEXT | PARAMETER

    • prioritybody · uint32可选

      According to the service name and service instance Metadata Filter the qualified service instance subset Service instance subset can set priority and weight Priority: integer, range [0, 9], the highest priority is 0 Weight: Integer Press priority routing, if there is high priority, low priority will not use If there is a subset of the same priority, then assign by weight Priority and weight can be not set / set up one / set two If the section is set priority, some are not set, it is considered that the priority is not set. If the part is set, some is not set, it is considered that the weight is not set to 0 If you have no weight, you think the weight is the same

    • weightbody · uint32可选

      weight

    • transferbody · string可选

      Forward requests to proxy service

    • isolatebody · bool可选

      Whether to isolate the SET, after isolation, no traffic will be allocated

    • namebody · string可选

      name desition name

  • descriptionbody · string可选

    泳道组描述信息

  • rulesbody · LaneRule[]可选

    rules

    • idbody · string可选

      id

    • namebody · string可选

      name

    • group_namebody · string可选

      所属泳道组的名称

    • traffic_match_rulebody · TrafficMatchRule可选

      流量匹配规则

      • argumentsbody · SourceMatch[]可选

        arguments

        • typebody · enum(Type)可选

          type 枚举:CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE

        • keybody · string可选

          header key or query key

        • valuebody · MatchString可选

          header value or query value

          • typebody · enum(MatchStringType)可选

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

          • valuebody · string可选

            value

          • value_typebody · enum(ValueType)可选

            value_type 枚举:TEXT | PARAMETER

      • random_percentbody · uint32可选

        随机百分比流量匹配, 1-100, 表示百分之几的流量会被匹配到, 默认值为 100

      • matchModebody · enum(TrafficMatchMode)可选

        matchMode 枚举:AND | OR

    • default_label_valuebody · string可选

      保存这个泳道的默认实例标签

    • enablebody · bool可选

      泳道规则是否启用

    • match_modebody · enum(LaneMatchMode)可选

      match_mode 枚举:STRICT | PERMISSIVE

    • prioritybody · uint32可选

      priority rules priority

    • descriptionbody · string可选

      description simple description rules

    • label_keybody · string可选

      属于该泳道的实例标签KEY,不填默认为lane

  • metadatabody · map<string,string>可选

    metadata

  • namespacebody · string必填

    namespace identifies the environment that owns this lane group.

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • laneGroupbody · LaneGroup可选

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

    • idbody · string可选

      泳道组 ID

    • namebody · string可选

      泳道组名称

    • entriesbody · TrafficEntry[]可选

      entries

      • typebody · string可选

        标记流量入口类型 type == "pole.io/gateway/spring-cloud-gateway", 则 selector 为 ServiceGatewaySelector type == "pole.io/service, 则 selector 为 ServiceSelector

      • selectorbody · any可选

        selector(google.protobuf.Any,按策略 unpack)。

    • destinationsbody · DestinationGroup[]可选

      destinations

      • servicebody · string可选

        Templated service and namespace

      • namespacebody · string可选

        namespace

      • labelsbody · map<string,MatchString>可选

        labels

        • typebody · enum(MatchStringType)可选

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

        • valuebody · string可选

          value

        • value_typebody · enum(ValueType)可选

          value_type 枚举:TEXT | PARAMETER

      • prioritybody · uint32可选

        According to the service name and service instance Metadata Filter the qualified service instance subset Service instance subset can set priority and weight Priority: integer, range [0, 9], the highest priority is 0 Weight: Integer Press priority routing, if there is high priority, low priority will not use If there is a subset of the same priority, then assign by weight Priority and weight can be not set / set up one / set two If the section is set priority, some are not set, it is considered that the priority is not set. If the part is set, some is not set, it is considered that the weight is not set to 0 If you have no weight, you think the weight is the same

      • weightbody · uint32可选

        weight

      • transferbody · string可选

        Forward requests to proxy service

      • isolatebody · bool可选

        Whether to isolate the SET, after isolation, no traffic will be allocated

      • namebody · string可选

        name desition name

    • revisionbody · string可选

      泳道组描述信息

    • descriptionbody · string可选

      泳道组描述信息

    • ctimebody · string可选

      泳道组的创建时间

    • mtimebody · string可选

      泳道组的更新时间

    • rulesbody · LaneRule[]可选

      rules

      • idbody · string可选

        id

      • namebody · string可选

        name

      • group_namebody · string可选

        所属泳道组的名称

      • traffic_match_rulebody · TrafficMatchRule可选

        流量匹配规则

        • argumentsbody · SourceMatch[]可选

          arguments

          • typebody · enum(Type)可选

            type 枚举:CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE

          • keybody · string可选

            header key or query key

          • valuebody · MatchString可选

            header value or query value

            • typebody · enum(MatchStringType)可选

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

            • valuebody · string可选

              value

            • value_typebody · enum(ValueType)可选

              value_type 枚举:TEXT | PARAMETER

        • random_percentbody · uint32可选

          随机百分比流量匹配, 1-100, 表示百分之几的流量会被匹配到, 默认值为 100

        • matchModebody · enum(TrafficMatchMode)可选

          matchMode 枚举:AND | OR

      • default_label_valuebody · string可选

        保存这个泳道的默认实例标签

      • enablebody · bool可选

        泳道规则是否启用

      • match_modebody · enum(LaneMatchMode)可选

        match_mode 枚举:STRICT | PERMISSIVE

      • 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

      • prioritybody · uint32可选

        priority rules priority

      • descriptionbody · string可选

        description simple description rules

      • label_keybody · string可选

        属于该泳道的实例标签KEY,不填默认为lane

    • metadatabody · map<string,string>可选

      metadata

    • editablebody · bool可选

      操作标志位

    • deleteablebody · bool可选

      deleteable

    • namespacebody · string可选

      namespace identifies the environment that owns this lane group.

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

更新泳道

更新规则;body 为数组。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · LaneGroup[]必填

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

  • idbody · string可选

    泳道组 ID

  • namebody · string可选

    泳道组名称

  • entriesbody · TrafficEntry[]可选

    entries

    • typebody · string可选

      标记流量入口类型 type == "pole.io/gateway/spring-cloud-gateway", 则 selector 为 ServiceGatewaySelector type == "pole.io/service, 则 selector 为 ServiceSelector

    • selectorbody · any可选

      selector(google.protobuf.Any,按策略 unpack)。

  • destinationsbody · DestinationGroup[]可选

    destinations

    • servicebody · string可选

      Templated service and namespace

    • namespacebody · string可选

      namespace

    • labelsbody · map<string,MatchString>可选

      labels

      • typebody · enum(MatchStringType)可选

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

      • valuebody · string可选

        value

      • value_typebody · enum(ValueType)可选

        value_type 枚举:TEXT | PARAMETER

    • prioritybody · uint32可选

      According to the service name and service instance Metadata Filter the qualified service instance subset Service instance subset can set priority and weight Priority: integer, range [0, 9], the highest priority is 0 Weight: Integer Press priority routing, if there is high priority, low priority will not use If there is a subset of the same priority, then assign by weight Priority and weight can be not set / set up one / set two If the section is set priority, some are not set, it is considered that the priority is not set. If the part is set, some is not set, it is considered that the weight is not set to 0 If you have no weight, you think the weight is the same

    • weightbody · uint32可选

      weight

    • transferbody · string可选

      Forward requests to proxy service

    • isolatebody · bool可选

      Whether to isolate the SET, after isolation, no traffic will be allocated

    • namebody · string可选

      name desition name

  • descriptionbody · string可选

    泳道组描述信息

  • rulesbody · LaneRule[]可选

    rules

    • idbody · string可选

      id

    • namebody · string可选

      name

    • group_namebody · string可选

      所属泳道组的名称

    • traffic_match_rulebody · TrafficMatchRule可选

      流量匹配规则

      • argumentsbody · SourceMatch[]可选

        arguments

        • typebody · enum(Type)可选

          type 枚举:CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE

        • keybody · string可选

          header key or query key

        • valuebody · MatchString可选

          header value or query value

          • typebody · enum(MatchStringType)可选

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

          • valuebody · string可选

            value

          • value_typebody · enum(ValueType)可选

            value_type 枚举:TEXT | PARAMETER

      • random_percentbody · uint32可选

        随机百分比流量匹配, 1-100, 表示百分之几的流量会被匹配到, 默认值为 100

      • matchModebody · enum(TrafficMatchMode)可选

        matchMode 枚举:AND | OR

    • default_label_valuebody · string可选

      保存这个泳道的默认实例标签

    • enablebody · bool可选

      泳道规则是否启用

    • match_modebody · enum(LaneMatchMode)可选

      match_mode 枚举:STRICT | PERMISSIVE

    • prioritybody · uint32可选

      priority rules priority

    • descriptionbody · string可选

      description simple description rules

    • label_keybody · string可选

      属于该泳道的实例标签KEY,不填默认为lane

  • metadatabody · map<string,string>可选

    metadata

  • namespacebody · string可选

    namespace identifies the environment that owns this lane group.

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • laneGroupbody · LaneGroup可选

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

    • idbody · string可选

      泳道组 ID

    • namebody · string可选

      泳道组名称

    • entriesbody · TrafficEntry[]可选

      entries

      • typebody · string可选

        标记流量入口类型 type == "pole.io/gateway/spring-cloud-gateway", 则 selector 为 ServiceGatewaySelector type == "pole.io/service, 则 selector 为 ServiceSelector

      • selectorbody · any可选

        selector(google.protobuf.Any,按策略 unpack)。

    • destinationsbody · DestinationGroup[]可选

      destinations

      • servicebody · string可选

        Templated service and namespace

      • namespacebody · string可选

        namespace

      • labelsbody · map<string,MatchString>可选

        labels

        • typebody · enum(MatchStringType)可选

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

        • valuebody · string可选

          value

        • value_typebody · enum(ValueType)可选

          value_type 枚举:TEXT | PARAMETER

      • prioritybody · uint32可选

        According to the service name and service instance Metadata Filter the qualified service instance subset Service instance subset can set priority and weight Priority: integer, range [0, 9], the highest priority is 0 Weight: Integer Press priority routing, if there is high priority, low priority will not use If there is a subset of the same priority, then assign by weight Priority and weight can be not set / set up one / set two If the section is set priority, some are not set, it is considered that the priority is not set. If the part is set, some is not set, it is considered that the weight is not set to 0 If you have no weight, you think the weight is the same

      • weightbody · uint32可选

        weight

      • transferbody · string可选

        Forward requests to proxy service

      • isolatebody · bool可选

        Whether to isolate the SET, after isolation, no traffic will be allocated

      • namebody · string可选

        name desition name

    • revisionbody · string可选

      泳道组描述信息

    • descriptionbody · string可选

      泳道组描述信息

    • ctimebody · string可选

      泳道组的创建时间

    • mtimebody · string可选

      泳道组的更新时间

    • rulesbody · LaneRule[]可选

      rules

      • idbody · string可选

        id

      • namebody · string可选

        name

      • group_namebody · string可选

        所属泳道组的名称

      • traffic_match_rulebody · TrafficMatchRule可选

        流量匹配规则

        • argumentsbody · SourceMatch[]可选

          arguments

          • typebody · enum(Type)可选

            type 枚举:CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE

          • keybody · string可选

            header key or query key

          • valuebody · MatchString可选

            header value or query value

            • typebody · enum(MatchStringType)可选

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

            • valuebody · string可选

              value

            • value_typebody · enum(ValueType)可选

              value_type 枚举:TEXT | PARAMETER

        • random_percentbody · uint32可选

          随机百分比流量匹配, 1-100, 表示百分之几的流量会被匹配到, 默认值为 100

        • matchModebody · enum(TrafficMatchMode)可选

          matchMode 枚举:AND | OR

      • default_label_valuebody · string可选

        保存这个泳道的默认实例标签

      • enablebody · bool可选

        泳道规则是否启用

      • match_modebody · enum(LaneMatchMode)可选

        match_mode 枚举:STRICT | PERMISSIVE

      • 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

      • prioritybody · uint32可选

        priority rules priority

      • descriptionbody · string可选

        description simple description rules

      • label_keybody · string可选

        属于该泳道的实例标签KEY,不填默认为lane

    • metadatabody · map<string,string>可选

      metadata

    • editablebody · bool可选

      操作标志位

    • deleteablebody · bool可选

      deleteable

    • namespacebody · string可选

      namespace identifies the environment that owns this lane group.

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

删除泳道

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

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · LaneGroup[]必填

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

  • idbody · string可选

    泳道组 ID

  • namebody · string可选

    泳道组名称

  • entriesbody · TrafficEntry[]可选

    entries

    • typebody · string可选

      标记流量入口类型 type == "pole.io/gateway/spring-cloud-gateway", 则 selector 为 ServiceGatewaySelector type == "pole.io/service, 则 selector 为 ServiceSelector

    • selectorbody · any可选

      selector(google.protobuf.Any,按策略 unpack)。

  • destinationsbody · DestinationGroup[]可选

    destinations

    • servicebody · string可选

      Templated service and namespace

    • namespacebody · string可选

      namespace

    • labelsbody · map<string,MatchString>可选

      labels

      • typebody · enum(MatchStringType)可选

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

      • valuebody · string可选

        value

      • value_typebody · enum(ValueType)可选

        value_type 枚举:TEXT | PARAMETER

    • prioritybody · uint32可选

      According to the service name and service instance Metadata Filter the qualified service instance subset Service instance subset can set priority and weight Priority: integer, range [0, 9], the highest priority is 0 Weight: Integer Press priority routing, if there is high priority, low priority will not use If there is a subset of the same priority, then assign by weight Priority and weight can be not set / set up one / set two If the section is set priority, some are not set, it is considered that the priority is not set. If the part is set, some is not set, it is considered that the weight is not set to 0 If you have no weight, you think the weight is the same

    • weightbody · uint32可选

      weight

    • transferbody · string可选

      Forward requests to proxy service

    • isolatebody · bool可选

      Whether to isolate the SET, after isolation, no traffic will be allocated

    • namebody · string可选

      name desition name

  • descriptionbody · string可选

    泳道组描述信息

  • rulesbody · LaneRule[]可选

    rules

    • idbody · string可选

      id

    • namebody · string可选

      name

    • group_namebody · string可选

      所属泳道组的名称

    • traffic_match_rulebody · TrafficMatchRule可选

      流量匹配规则

      • argumentsbody · SourceMatch[]可选

        arguments

        • typebody · enum(Type)可选

          type 枚举:CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE

        • keybody · string可选

          header key or query key

        • valuebody · MatchString可选

          header value or query value

          • typebody · enum(MatchStringType)可选

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

          • valuebody · string可选

            value

          • value_typebody · enum(ValueType)可选

            value_type 枚举:TEXT | PARAMETER

      • random_percentbody · uint32可选

        随机百分比流量匹配, 1-100, 表示百分之几的流量会被匹配到, 默认值为 100

      • matchModebody · enum(TrafficMatchMode)可选

        matchMode 枚举:AND | OR

    • default_label_valuebody · string可选

      保存这个泳道的默认实例标签

    • enablebody · bool可选

      泳道规则是否启用

    • match_modebody · enum(LaneMatchMode)可选

      match_mode 枚举:STRICT | PERMISSIVE

    • prioritybody · uint32可选

      priority rules priority

    • descriptionbody · string可选

      description simple description rules

    • label_keybody · string可选

      属于该泳道的实例标签KEY,不填默认为lane

  • metadatabody · map<string,string>可选

    metadata

  • namespacebody · string可选

    namespace identifies the environment that owns this lane group.

  • codebody · uint32必填

    业务码,成功多为 200000。

  • infobody · string可选

    提示信息。

  • laneGroupbody · LaneGroup可选

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

    • idbody · string可选

      泳道组 ID

    • namebody · string可选

      泳道组名称

    • entriesbody · TrafficEntry[]可选

      entries

      • typebody · string可选

        标记流量入口类型 type == "pole.io/gateway/spring-cloud-gateway", 则 selector 为 ServiceGatewaySelector type == "pole.io/service, 则 selector 为 ServiceSelector

      • selectorbody · any可选

        selector(google.protobuf.Any,按策略 unpack)。

    • destinationsbody · DestinationGroup[]可选

      destinations

      • servicebody · string可选

        Templated service and namespace

      • namespacebody · string可选

        namespace

      • labelsbody · map<string,MatchString>可选

        labels

        • typebody · enum(MatchStringType)可选

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

        • valuebody · string可选

          value

        • value_typebody · enum(ValueType)可选

          value_type 枚举:TEXT | PARAMETER

      • prioritybody · uint32可选

        According to the service name and service instance Metadata Filter the qualified service instance subset Service instance subset can set priority and weight Priority: integer, range [0, 9], the highest priority is 0 Weight: Integer Press priority routing, if there is high priority, low priority will not use If there is a subset of the same priority, then assign by weight Priority and weight can be not set / set up one / set two If the section is set priority, some are not set, it is considered that the priority is not set. If the part is set, some is not set, it is considered that the weight is not set to 0 If you have no weight, you think the weight is the same

      • weightbody · uint32可选

        weight

      • transferbody · string可选

        Forward requests to proxy service

      • isolatebody · bool可选

        Whether to isolate the SET, after isolation, no traffic will be allocated

      • namebody · string可选

        name desition name

    • revisionbody · string可选

      泳道组描述信息

    • descriptionbody · string可选

      泳道组描述信息

    • ctimebody · string可选

      泳道组的创建时间

    • mtimebody · string可选

      泳道组的更新时间

    • rulesbody · LaneRule[]可选

      rules

      • idbody · string可选

        id

      • namebody · string可选

        name

      • group_namebody · string可选

        所属泳道组的名称

      • traffic_match_rulebody · TrafficMatchRule可选

        流量匹配规则

        • argumentsbody · SourceMatch[]可选

          arguments

          • typebody · enum(Type)可选

            type 枚举:CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE

          • keybody · string可选

            header key or query key

          • valuebody · MatchString可选

            header value or query value

            • typebody · enum(MatchStringType)可选

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

            • valuebody · string可选

              value

            • value_typebody · enum(ValueType)可选

              value_type 枚举:TEXT | PARAMETER

        • random_percentbody · uint32可选

          随机百分比流量匹配, 1-100, 表示百分之几的流量会被匹配到, 默认值为 100

        • matchModebody · enum(TrafficMatchMode)可选

          matchMode 枚举:AND | OR

      • default_label_valuebody · string可选

        保存这个泳道的默认实例标签

      • enablebody · bool可选

        泳道规则是否启用

      • match_modebody · enum(LaneMatchMode)可选

        match_mode 枚举:STRICT | PERMISSIVE

      • 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

      • prioritybody · uint32可选

        priority rules priority

      • descriptionbody · string可选

        description simple description rules

      • label_keybody · string可选

        属于该泳道的实例标签KEY,不填默认为lane

    • metadatabody · map<string,string>可选

      metadata

    • editablebody · bool可选

      操作标志位

    • deleteablebody · bool可选

      deleteable

    • namespacebody · string可选

      namespace identifies the environment that owns this lane group.

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

查询泳道发布

查询已发布版本。

  • Authorizationheader · string必填

    登录返回的 token。

  • idquery · string可选

    规则 ID。

  • limitquery · integer可选

    分页大小。

请求示例
curl -sS 'http://127.0.0.1:8090/naming/v1/lane/groups/releases?limit=20' \
  -H "Authorization: $TOKEN"
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
PUT/naming/v1/lane/groups/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/lane/groups/releases/rollback' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"id":"<rule-id>"}]'
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
PUT/naming/v1/lane/groups/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/lane/groups/releases/stopbeta' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[{"id":"<rule-id>"}]'
响应示例
{
  "code": 200000,
  "info": "execute success",
  "amount": 1
}
POST/naming/v1/lane/groups/rules需要鉴权

创建泳道规则

创建泳道规则。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · LaneRule[]必填

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

  • idbody · string可选

    id

  • namebody · string可选

    name

  • group_namebody · string可选

    group_name

  • traffic_match_rulebody · TrafficMatchRule可选

    traffic_match_rule

    • argumentsbody · SourceMatch[]可选

      arguments

      • typebody · enum(Type)可选

        type 枚举:CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE

      • 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

    • random_percentbody · uint32可选

      random_percent

    • matchModebody · enum(TrafficMatchMode)可选

      matchMode 枚举:AND | OR

  • default_label_valuebody · string可选

    default_label_value

  • enablebody · bool可选

    enable

  • match_modebody · enum(LaneMatchMode)可选

    match_mode 枚举:STRICT | PERMISSIVE

  • prioritybody · uint32可选

    priority

  • descriptionbody · string可选

    description

  • label_keybody · string可选

    label_key

  • codebody · uint32必填

    业务码。

  • infobody · string可选

    提示信息。

  • LaneRulebody · LaneRule可选

    实体字段。

    • idbody · string可选

      id

    • namebody · string可选

      name

    • group_namebody · string可选

      group_name

    • traffic_match_rulebody · TrafficMatchRule可选

      traffic_match_rule

      • argumentsbody · SourceMatch[]可选

        arguments

        • typebody · enum(Type)可选

          type 枚举:CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE

        • 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

      • random_percentbody · uint32可选

        random_percent

      • matchModebody · enum(TrafficMatchMode)可选

        matchMode 枚举:AND | OR

    • default_label_valuebody · string可选

      default_label_value

    • enablebody · bool可选

      enable

    • match_modebody · enum(LaneMatchMode)可选

      match_mode 枚举:STRICT | PERMISSIVE

    • revisionbody · string可选

      revision

    • ctimebody · string可选

      ctime

    • mtimebody · string可选

      mtime

    • etimebody · string可选

      etime

    • prioritybody · uint32可选

      priority

    • descriptionbody · string可选

      description

    • label_keybody · string可选

      label_key

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

更新泳道规则

更新泳道规则。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · LaneRule[]必填

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

  • idbody · string可选

    id

  • namebody · string可选

    name

  • group_namebody · string可选

    group_name

  • traffic_match_rulebody · TrafficMatchRule可选

    traffic_match_rule

    • argumentsbody · SourceMatch[]可选

      arguments

      • typebody · enum(Type)可选

        type 枚举:CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE

      • 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

    • random_percentbody · uint32可选

      random_percent

    • matchModebody · enum(TrafficMatchMode)可选

      matchMode 枚举:AND | OR

  • default_label_valuebody · string可选

    default_label_value

  • enablebody · bool可选

    enable

  • match_modebody · enum(LaneMatchMode)可选

    match_mode 枚举:STRICT | PERMISSIVE

  • prioritybody · uint32可选

    priority

  • descriptionbody · string可选

    description

  • label_keybody · string可选

    label_key

  • codebody · uint32必填

    业务码。

  • infobody · string可选

    提示信息。

  • LaneRulebody · LaneRule可选

    实体字段。

    • idbody · string可选

      id

    • namebody · string可选

      name

    • group_namebody · string可选

      group_name

    • traffic_match_rulebody · TrafficMatchRule可选

      traffic_match_rule

      • argumentsbody · SourceMatch[]可选

        arguments

        • typebody · enum(Type)可选

          type 枚举:CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE

        • 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

      • random_percentbody · uint32可选

        random_percent

      • matchModebody · enum(TrafficMatchMode)可选

        matchMode 枚举:AND | OR

    • default_label_valuebody · string可选

      default_label_value

    • enablebody · bool可选

      enable

    • match_modebody · enum(LaneMatchMode)可选

      match_mode 枚举:STRICT | PERMISSIVE

    • revisionbody · string可选

      revision

    • ctimebody · string可选

      ctime

    • mtimebody · string可选

      mtime

    • etimebody · string可选

      etime

    • prioritybody · uint32可选

      priority

    • descriptionbody · string可选

      description

    • label_keybody · string可选

      label_key

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

删除泳道规则

删除泳道规则。

  • Authorizationheader · string必填

    登录返回的 token。

  • (body)body · LaneRule[]必填

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

  • idbody · string可选

    id

  • namebody · string可选

    name

  • group_namebody · string可选

    group_name

  • traffic_match_rulebody · TrafficMatchRule可选

    traffic_match_rule

    • argumentsbody · SourceMatch[]可选

      arguments

      • typebody · enum(Type)可选

        type 枚举:CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE

      • 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

    • random_percentbody · uint32可选

      random_percent

    • matchModebody · enum(TrafficMatchMode)可选

      matchMode 枚举:AND | OR

  • default_label_valuebody · string可选

    default_label_value

  • enablebody · bool可选

    enable

  • match_modebody · enum(LaneMatchMode)可选

    match_mode 枚举:STRICT | PERMISSIVE

  • prioritybody · uint32可选

    priority

  • descriptionbody · string可选

    description

  • label_keybody · string可选

    label_key

  • codebody · uint32必填

    业务码。

  • infobody · string可选

    提示信息。

  • LaneRulebody · LaneRule可选

    实体字段。

    • idbody · string可选

      id

    • namebody · string可选

      name

    • group_namebody · string可选

      group_name

    • traffic_match_rulebody · TrafficMatchRule可选

      traffic_match_rule

      • argumentsbody · SourceMatch[]可选

        arguments

        • typebody · enum(Type)可选

          type 枚举:CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE

        • 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

      • random_percentbody · uint32可选

        random_percent

      • matchModebody · enum(TrafficMatchMode)可选

        matchMode 枚举:AND | OR

    • default_label_valuebody · string可选

      default_label_value

    • enablebody · bool可选

      enable

    • match_modebody · enum(LaneMatchMode)可选

      match_mode 枚举:STRICT | PERMISSIVE

    • revisionbody · string可选

      revision

    • ctimebody · string可选

      ctime

    • mtimebody · string可选

      mtime

    • etimebody · string可选

      etime

    • prioritybody · uint32可选

      priority

    • descriptionbody · string可选

      description

    • label_keybody · string可选

      label_key

请求示例
curl -sS -X POST 'http://127.0.0.1:8090/naming/v1/lane/groups/rules/delete' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[]'
响应示例
{
  "code": 200000,
  "info": "execute success"
}
POST/naming/v1/lane/groups/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/lane/groups/releases/delete' \
  -H "Authorization: $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '[]'
响应示例
{
  "code": 200000,
  "info": "execute success"
}

On this page