Routing
Route rules and releases.
Route rules and releases.
Default Base URL: http://127.0.0.1:8090. Management APIs require Authorization (token from login).
Routing
Routing: list, create/update, delete, and releases (publish / rollback / stopbeta). Bodies are rule arrays; fields follow specification.
/naming/v1/routingsAuth requiredList routing
Paginated routing list.
Parameters
- Authorizationheader · stringrequired
Token from login.
- idquery · stringoptional
Filter by ID.
- namequery · stringoptional
Filter by name.
- namespacequery · stringoptional
Filter by namespace.
- servicequery · stringoptional
Filter by service.
- enablequery · booloptional
Enabled filter.
- offsetquery · integeroptional
Offset, default 0.
- limitquery · integeroptional
Page size, often max 100.
curl -sS 'http://127.0.0.1:8090/naming/v1/routings?limit=20' \
-H "Authorization: $TOKEN"{
"code": 200000,
"info": "execute success",
"data": [{ "id": "...", "name": "demo", "enable": true }]
}/naming/v1/routings/detailAuth requiredGet routing detail
Fetch one rule by id / filters.
Parameters
- Authorizationheader · stringrequired
Token from login.
- idquery · stringoptional
Filter by ID.
- namequery · stringoptional
Filter by name.
- namespacequery · stringoptional
Filter by namespace.
- servicequery · stringoptional
Filter by service.
- enablequery · booloptional
Enabled filter.
- offsetquery · integeroptional
Offset, default 0.
- limitquery · integeroptional
Page size, often max 100.
curl -sS 'http://127.0.0.1:8090/naming/v1/routings/detail?id=<id>' \
-H "Authorization: $TOKEN"{
"code": 200000,
"info": "execute success",
"amount": 1
}/naming/v1/routingsAuth requiredCreate routing
Write bodies are usually protobuf message arrays; fields below are per-object (see specification).
Parameters
- Authorizationheader · stringrequired
Token from login.
- (body)body · RouteRule[]required
Request body is a JSON array of RouteRule: [{...}, ...]. Fields below are the full per-item schema (including nested).
- idbody · stringoptional
id
- namebody · stringrequired
route rule name
- enablebody · booloptional
Enable this router
- route_policybody · enum(RoutePolicy)optional
Router type enum:
- routing_configbody · anyoptional
Routing configuration for router (google.protobuf.Any; unpack by policy).
- route_policy=RulePolicybody · CustomRouteoptional
When route_policy=RulePolicy, unpack as CustomRoute.
- callerbody · ServiceKeyoptional
source source info deprecated_filed only for compatible to the old version server
- servicebody · stringoptional
service service name
- namespacebody · stringoptional
namespace namespace of service
- calleebody · ServiceKeyoptional
destination destinations info deprecated_filed only for compatible to the old version server
- servicebody · stringoptional
service service name
- namespacebody · stringoptional
namespace namespace of service
- rulesbody · CustomRouteRule[]optional
rules
- namebody · stringoptional
sub routing rule name
- argumentsbody · TrafficMatchRuleoptional
Master Control Service Example Tag or Request Label Value supports regular matching
- argumentsbody · SourceMatch[]optional
arguments
- typebody · enum(Type)optional
type enum: CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE
- keybody · stringoptional
header key or query key
- valuebody · MatchStringoptional
header value or query value
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- random_percentbody · uint32optional
随机百分比流量匹配, 1-100, 表示百分之几的流量会被匹配到, 默认值为 100
- matchModebody · enum(TrafficMatchMode)optional
matchMode enum: AND | OR
- destinationsbody · DestinationGroup[]optional
destinations
- servicebody · stringoptional
Templated service and namespace
- namespacebody · stringoptional
namespace
- labelsbody · map<string,MatchString>optional
labels
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- prioritybody · uint32optional
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 · uint32optional
weight
- transferbody · stringoptional
Forward requests to proxy service
- isolatebody · booloptional
Whether to isolate the SET, after isolation, no traffic will be allocated
- namebody · stringoptional
name desition name
- route_policy=MetadataPolicybody · MetadataRoutingConfigoptional
When route_policy=MetadataPolicy, unpack as MetadataRoutingConfig.
- servicebody · stringoptional
service
- namespacebody · stringoptional
namespace
- labelsbody · map<string,string>optional
labels
- failoverbody · MetadataFailoveroptional
When metadata not found, it will fall back to the
- failover_rangebody · enum(FailoverRange)optional
failover_range metadata route bottom type enum: ALL | OTHERS | OTHER_KEYS
- labelsbody · map<string,string>optional
labels
- route_policy=NearbyPolicybody · NearbyRoutingConfigoptional
When route_policy=NearbyPolicy, unpack as NearbyRoutingConfig.
- servicebody · stringoptional
被调服务名,支持*,代表全部服务
- namespacebody · stringoptional
被调命名空间
- match_levelbody · enum(LocationLevel)optional
默认就近级别 enum: UNKNOWN | CAMPUS | ZONE | REGION | ALL
- max_match_levelbody · enum(LocationLevel)optional
最大就近级别 enum: UNKNOWN | CAMPUS | ZONE | REGION | ALL
- strict_nearbybody · booloptional
是否强制就近
- prioritybody · uint32optional
priority rules priority
- descriptionbody · stringoptional
description simple description rules
- metadatabody · map<string,string>optional
metadata
- namespacebody · stringrequired
namespace identifies the environment that owns this rule.
Response fields
- codebody · uint32required
Business code; success is usually 200000.
- infobody · stringoptional
Info message.
- routeRulebody · RouteRuleoptional
RouteRule entity fields (batch APIs nest under responses[]).
- idbody · stringoptional
id
- namebody · stringoptional
route rule name
- enablebody · booloptional
Enable this router
- route_policybody · enum(RoutePolicy)optional
Router type enum:
- routing_configbody · anyoptional
Routing configuration for router (google.protobuf.Any; unpack by policy).
- route_policy=RulePolicybody · CustomRouteoptional
When route_policy=RulePolicy, unpack as CustomRoute.
- callerbody · ServiceKeyoptional
source source info deprecated_filed only for compatible to the old version server
- servicebody · stringoptional
service service name
- namespacebody · stringoptional
namespace namespace of service
- calleebody · ServiceKeyoptional
destination destinations info deprecated_filed only for compatible to the old version server
- servicebody · stringoptional
service service name
- namespacebody · stringoptional
namespace namespace of service
- rulesbody · CustomRouteRule[]optional
rules
- namebody · stringoptional
sub routing rule name
- argumentsbody · TrafficMatchRuleoptional
Master Control Service Example Tag or Request Label Value supports regular matching
- argumentsbody · SourceMatch[]optional
arguments
- typebody · enum(Type)optional
type enum: CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE
- keybody · stringoptional
header key or query key
- valuebody · MatchStringoptional
header value or query value
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- random_percentbody · uint32optional
随机百分比流量匹配, 1-100, 表示百分之几的流量会被匹配到, 默认值为 100
- matchModebody · enum(TrafficMatchMode)optional
matchMode enum: AND | OR
- destinationsbody · DestinationGroup[]optional
destinations
- servicebody · stringoptional
Templated service and namespace
- namespacebody · stringoptional
namespace
- labelsbody · map<string,MatchString>optional
labels
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- prioritybody · uint32optional
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 · uint32optional
weight
- transferbody · stringoptional
Forward requests to proxy service
- isolatebody · booloptional
Whether to isolate the SET, after isolation, no traffic will be allocated
- namebody · stringoptional
name desition name
- route_policy=MetadataPolicybody · MetadataRoutingConfigoptional
When route_policy=MetadataPolicy, unpack as MetadataRoutingConfig.
- servicebody · stringoptional
service
- namespacebody · stringoptional
namespace
- labelsbody · map<string,string>optional
labels
- failoverbody · MetadataFailoveroptional
When metadata not found, it will fall back to the
- failover_rangebody · enum(FailoverRange)optional
failover_range metadata route bottom type enum: ALL | OTHERS | OTHER_KEYS
- labelsbody · map<string,string>optional
labels
- route_policy=NearbyPolicybody · NearbyRoutingConfigoptional
When route_policy=NearbyPolicy, unpack as NearbyRoutingConfig.
- servicebody · stringoptional
被调服务名,支持*,代表全部服务
- namespacebody · stringoptional
被调命名空间
- match_levelbody · enum(LocationLevel)optional
默认就近级别 enum: UNKNOWN | CAMPUS | ZONE | REGION | ALL
- max_match_levelbody · enum(LocationLevel)optional
最大就近级别 enum: UNKNOWN | CAMPUS | ZONE | REGION | ALL
- strict_nearbybody · booloptional
是否强制就近
- revisionbody · stringoptional
revision routing version
- ctimebody · stringoptional
ctime create time of the rules
- mtimebody · stringoptional
mtime modify time of the rules
- etimebody · stringoptional
etime enable time of the rules
- prioritybody · uint32optional
priority rules priority
- descriptionbody · stringoptional
description simple description rules
- metadatabody · map<string,string>optional
metadata
- editablebody · booloptional
操作标志位
- deleteablebody · booloptional
deleteable
- namespacebody · stringoptional
namespace identifies the environment that owns this rule.
curl -sS -X POST 'http://127.0.0.1:8090/naming/v1/routings' \
-H "Authorization: $TOKEN" \
-H 'Content-Type: application/json' \
-d '[{"name":"demo-route","enable":true}]'{
"code": 200000,
"info": "execute success",
"amount": 1
}/naming/v1/routingsAuth requiredUpdate routing
Update rules; body is an array.
Parameters
- Authorizationheader · stringrequired
Token from login.
- (body)body · RouteRule[]required
Request body is a JSON array of RouteRule: [{...}, ...]. Fields below are the full per-item schema (including nested).
- idbody · stringoptional
id
- namebody · stringoptional
route rule name
- enablebody · booloptional
Enable this router
- route_policybody · enum(RoutePolicy)optional
Router type enum:
- routing_configbody · anyoptional
Routing configuration for router (google.protobuf.Any; unpack by policy).
- route_policy=RulePolicybody · CustomRouteoptional
When route_policy=RulePolicy, unpack as CustomRoute.
- callerbody · ServiceKeyoptional
source source info deprecated_filed only for compatible to the old version server
- servicebody · stringoptional
service service name
- namespacebody · stringoptional
namespace namespace of service
- calleebody · ServiceKeyoptional
destination destinations info deprecated_filed only for compatible to the old version server
- servicebody · stringoptional
service service name
- namespacebody · stringoptional
namespace namespace of service
- rulesbody · CustomRouteRule[]optional
rules
- namebody · stringoptional
sub routing rule name
- argumentsbody · TrafficMatchRuleoptional
Master Control Service Example Tag or Request Label Value supports regular matching
- argumentsbody · SourceMatch[]optional
arguments
- typebody · enum(Type)optional
type enum: CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE
- keybody · stringoptional
header key or query key
- valuebody · MatchStringoptional
header value or query value
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- random_percentbody · uint32optional
随机百分比流量匹配, 1-100, 表示百分之几的流量会被匹配到, 默认值为 100
- matchModebody · enum(TrafficMatchMode)optional
matchMode enum: AND | OR
- destinationsbody · DestinationGroup[]optional
destinations
- servicebody · stringoptional
Templated service and namespace
- namespacebody · stringoptional
namespace
- labelsbody · map<string,MatchString>optional
labels
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- prioritybody · uint32optional
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 · uint32optional
weight
- transferbody · stringoptional
Forward requests to proxy service
- isolatebody · booloptional
Whether to isolate the SET, after isolation, no traffic will be allocated
- namebody · stringoptional
name desition name
- route_policy=MetadataPolicybody · MetadataRoutingConfigoptional
When route_policy=MetadataPolicy, unpack as MetadataRoutingConfig.
- servicebody · stringoptional
service
- namespacebody · stringoptional
namespace
- labelsbody · map<string,string>optional
labels
- failoverbody · MetadataFailoveroptional
When metadata not found, it will fall back to the
- failover_rangebody · enum(FailoverRange)optional
failover_range metadata route bottom type enum: ALL | OTHERS | OTHER_KEYS
- labelsbody · map<string,string>optional
labels
- route_policy=NearbyPolicybody · NearbyRoutingConfigoptional
When route_policy=NearbyPolicy, unpack as NearbyRoutingConfig.
- servicebody · stringoptional
被调服务名,支持*,代表全部服务
- namespacebody · stringoptional
被调命名空间
- match_levelbody · enum(LocationLevel)optional
默认就近级别 enum: UNKNOWN | CAMPUS | ZONE | REGION | ALL
- max_match_levelbody · enum(LocationLevel)optional
最大就近级别 enum: UNKNOWN | CAMPUS | ZONE | REGION | ALL
- strict_nearbybody · booloptional
是否强制就近
- prioritybody · uint32optional
priority rules priority
- descriptionbody · stringoptional
description simple description rules
- metadatabody · map<string,string>optional
metadata
- namespacebody · stringoptional
namespace identifies the environment that owns this rule.
Response fields
- codebody · uint32required
Business code; success is usually 200000.
- infobody · stringoptional
Info message.
- routeRulebody · RouteRuleoptional
RouteRule entity fields (batch APIs nest under responses[]).
- idbody · stringoptional
id
- namebody · stringoptional
route rule name
- enablebody · booloptional
Enable this router
- route_policybody · enum(RoutePolicy)optional
Router type enum:
- routing_configbody · anyoptional
Routing configuration for router (google.protobuf.Any; unpack by policy).
- route_policy=RulePolicybody · CustomRouteoptional
When route_policy=RulePolicy, unpack as CustomRoute.
- callerbody · ServiceKeyoptional
source source info deprecated_filed only for compatible to the old version server
- servicebody · stringoptional
service service name
- namespacebody · stringoptional
namespace namespace of service
- calleebody · ServiceKeyoptional
destination destinations info deprecated_filed only for compatible to the old version server
- servicebody · stringoptional
service service name
- namespacebody · stringoptional
namespace namespace of service
- rulesbody · CustomRouteRule[]optional
rules
- namebody · stringoptional
sub routing rule name
- argumentsbody · TrafficMatchRuleoptional
Master Control Service Example Tag or Request Label Value supports regular matching
- argumentsbody · SourceMatch[]optional
arguments
- typebody · enum(Type)optional
type enum: CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE
- keybody · stringoptional
header key or query key
- valuebody · MatchStringoptional
header value or query value
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- random_percentbody · uint32optional
随机百分比流量匹配, 1-100, 表示百分之几的流量会被匹配到, 默认值为 100
- matchModebody · enum(TrafficMatchMode)optional
matchMode enum: AND | OR
- destinationsbody · DestinationGroup[]optional
destinations
- servicebody · stringoptional
Templated service and namespace
- namespacebody · stringoptional
namespace
- labelsbody · map<string,MatchString>optional
labels
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- prioritybody · uint32optional
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 · uint32optional
weight
- transferbody · stringoptional
Forward requests to proxy service
- isolatebody · booloptional
Whether to isolate the SET, after isolation, no traffic will be allocated
- namebody · stringoptional
name desition name
- route_policy=MetadataPolicybody · MetadataRoutingConfigoptional
When route_policy=MetadataPolicy, unpack as MetadataRoutingConfig.
- servicebody · stringoptional
service
- namespacebody · stringoptional
namespace
- labelsbody · map<string,string>optional
labels
- failoverbody · MetadataFailoveroptional
When metadata not found, it will fall back to the
- failover_rangebody · enum(FailoverRange)optional
failover_range metadata route bottom type enum: ALL | OTHERS | OTHER_KEYS
- labelsbody · map<string,string>optional
labels
- route_policy=NearbyPolicybody · NearbyRoutingConfigoptional
When route_policy=NearbyPolicy, unpack as NearbyRoutingConfig.
- servicebody · stringoptional
被调服务名,支持*,代表全部服务
- namespacebody · stringoptional
被调命名空间
- match_levelbody · enum(LocationLevel)optional
默认就近级别 enum: UNKNOWN | CAMPUS | ZONE | REGION | ALL
- max_match_levelbody · enum(LocationLevel)optional
最大就近级别 enum: UNKNOWN | CAMPUS | ZONE | REGION | ALL
- strict_nearbybody · booloptional
是否强制就近
- revisionbody · stringoptional
revision routing version
- ctimebody · stringoptional
ctime create time of the rules
- mtimebody · stringoptional
mtime modify time of the rules
- etimebody · stringoptional
etime enable time of the rules
- prioritybody · uint32optional
priority rules priority
- descriptionbody · stringoptional
description simple description rules
- metadatabody · map<string,string>optional
metadata
- editablebody · booloptional
操作标志位
- deleteablebody · booloptional
deleteable
- namespacebody · stringoptional
namespace identifies the environment that owns this rule.
curl -sS -X PUT 'http://127.0.0.1:8090/naming/v1/routings' \
-H "Authorization: $TOKEN" \
-H 'Content-Type: application/json' \
-d '[{"name":"demo-route","enable":true}]'{
"code": 200000,
"info": "execute success",
"amount": 1
}/naming/v1/routings/deleteAuth requiredDelete routing
Delete rules; body is an array with ids.
Parameters
- Authorizationheader · stringrequired
Token from login.
- (body)body · RouteRule[]required
Request body is a JSON array of RouteRule: [{...}, ...]. Fields below are the full per-item schema (including nested).
- idbody · stringoptional
id
- namebody · stringoptional
route rule name
- enablebody · booloptional
Enable this router
- route_policybody · enum(RoutePolicy)optional
Router type enum:
- routing_configbody · anyoptional
Routing configuration for router (google.protobuf.Any; unpack by policy).
- route_policy=RulePolicybody · CustomRouteoptional
When route_policy=RulePolicy, unpack as CustomRoute.
- callerbody · ServiceKeyoptional
source source info deprecated_filed only for compatible to the old version server
- servicebody · stringoptional
service service name
- namespacebody · stringoptional
namespace namespace of service
- calleebody · ServiceKeyoptional
destination destinations info deprecated_filed only for compatible to the old version server
- servicebody · stringoptional
service service name
- namespacebody · stringoptional
namespace namespace of service
- rulesbody · CustomRouteRule[]optional
rules
- namebody · stringoptional
sub routing rule name
- argumentsbody · TrafficMatchRuleoptional
Master Control Service Example Tag or Request Label Value supports regular matching
- argumentsbody · SourceMatch[]optional
arguments
- typebody · enum(Type)optional
type enum: CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE
- keybody · stringoptional
header key or query key
- valuebody · MatchStringoptional
header value or query value
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- random_percentbody · uint32optional
随机百分比流量匹配, 1-100, 表示百分之几的流量会被匹配到, 默认值为 100
- matchModebody · enum(TrafficMatchMode)optional
matchMode enum: AND | OR
- destinationsbody · DestinationGroup[]optional
destinations
- servicebody · stringoptional
Templated service and namespace
- namespacebody · stringoptional
namespace
- labelsbody · map<string,MatchString>optional
labels
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- prioritybody · uint32optional
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 · uint32optional
weight
- transferbody · stringoptional
Forward requests to proxy service
- isolatebody · booloptional
Whether to isolate the SET, after isolation, no traffic will be allocated
- namebody · stringoptional
name desition name
- route_policy=MetadataPolicybody · MetadataRoutingConfigoptional
When route_policy=MetadataPolicy, unpack as MetadataRoutingConfig.
- servicebody · stringoptional
service
- namespacebody · stringoptional
namespace
- labelsbody · map<string,string>optional
labels
- failoverbody · MetadataFailoveroptional
When metadata not found, it will fall back to the
- failover_rangebody · enum(FailoverRange)optional
failover_range metadata route bottom type enum: ALL | OTHERS | OTHER_KEYS
- labelsbody · map<string,string>optional
labels
- route_policy=NearbyPolicybody · NearbyRoutingConfigoptional
When route_policy=NearbyPolicy, unpack as NearbyRoutingConfig.
- servicebody · stringoptional
被调服务名,支持*,代表全部服务
- namespacebody · stringoptional
被调命名空间
- match_levelbody · enum(LocationLevel)optional
默认就近级别 enum: UNKNOWN | CAMPUS | ZONE | REGION | ALL
- max_match_levelbody · enum(LocationLevel)optional
最大就近级别 enum: UNKNOWN | CAMPUS | ZONE | REGION | ALL
- strict_nearbybody · booloptional
是否强制就近
- prioritybody · uint32optional
priority rules priority
- descriptionbody · stringoptional
description simple description rules
- metadatabody · map<string,string>optional
metadata
- namespacebody · stringoptional
namespace identifies the environment that owns this rule.
Response fields
- codebody · uint32required
Business code; success is usually 200000.
- infobody · stringoptional
Info message.
- routeRulebody · RouteRuleoptional
RouteRule entity fields (batch APIs nest under responses[]).
- idbody · stringoptional
id
- namebody · stringoptional
route rule name
- enablebody · booloptional
Enable this router
- route_policybody · enum(RoutePolicy)optional
Router type enum:
- routing_configbody · anyoptional
Routing configuration for router (google.protobuf.Any; unpack by policy).
- route_policy=RulePolicybody · CustomRouteoptional
When route_policy=RulePolicy, unpack as CustomRoute.
- callerbody · ServiceKeyoptional
source source info deprecated_filed only for compatible to the old version server
- servicebody · stringoptional
service service name
- namespacebody · stringoptional
namespace namespace of service
- calleebody · ServiceKeyoptional
destination destinations info deprecated_filed only for compatible to the old version server
- servicebody · stringoptional
service service name
- namespacebody · stringoptional
namespace namespace of service
- rulesbody · CustomRouteRule[]optional
rules
- namebody · stringoptional
sub routing rule name
- argumentsbody · TrafficMatchRuleoptional
Master Control Service Example Tag or Request Label Value supports regular matching
- argumentsbody · SourceMatch[]optional
arguments
- typebody · enum(Type)optional
type enum: CUSTOM | METHOD | HEADER | QUERY | CALLER_IP | PATH | COOKIE | CALLER_METADATA | CALLER_SERVICE
- keybody · stringoptional
header key or query key
- valuebody · MatchStringoptional
header value or query value
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- random_percentbody · uint32optional
随机百分比流量匹配, 1-100, 表示百分之几的流量会被匹配到, 默认值为 100
- matchModebody · enum(TrafficMatchMode)optional
matchMode enum: AND | OR
- destinationsbody · DestinationGroup[]optional
destinations
- servicebody · stringoptional
Templated service and namespace
- namespacebody · stringoptional
namespace
- labelsbody · map<string,MatchString>optional
labels
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- prioritybody · uint32optional
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 · uint32optional
weight
- transferbody · stringoptional
Forward requests to proxy service
- isolatebody · booloptional
Whether to isolate the SET, after isolation, no traffic will be allocated
- namebody · stringoptional
name desition name
- route_policy=MetadataPolicybody · MetadataRoutingConfigoptional
When route_policy=MetadataPolicy, unpack as MetadataRoutingConfig.
- servicebody · stringoptional
service
- namespacebody · stringoptional
namespace
- labelsbody · map<string,string>optional
labels
- failoverbody · MetadataFailoveroptional
When metadata not found, it will fall back to the
- failover_rangebody · enum(FailoverRange)optional
failover_range metadata route bottom type enum: ALL | OTHERS | OTHER_KEYS
- labelsbody · map<string,string>optional
labels
- route_policy=NearbyPolicybody · NearbyRoutingConfigoptional
When route_policy=NearbyPolicy, unpack as NearbyRoutingConfig.
- servicebody · stringoptional
被调服务名,支持*,代表全部服务
- namespacebody · stringoptional
被调命名空间
- match_levelbody · enum(LocationLevel)optional
默认就近级别 enum: UNKNOWN | CAMPUS | ZONE | REGION | ALL
- max_match_levelbody · enum(LocationLevel)optional
最大就近级别 enum: UNKNOWN | CAMPUS | ZONE | REGION | ALL
- strict_nearbybody · booloptional
是否强制就近
- revisionbody · stringoptional
revision routing version
- ctimebody · stringoptional
ctime create time of the rules
- mtimebody · stringoptional
mtime modify time of the rules
- etimebody · stringoptional
etime enable time of the rules
- prioritybody · uint32optional
priority rules priority
- descriptionbody · stringoptional
description simple description rules
- metadatabody · map<string,string>optional
metadata
- editablebody · booloptional
操作标志位
- deleteablebody · booloptional
deleteable
- namespacebody · stringoptional
namespace identifies the environment that owns this rule.
curl -sS -X POST 'http://127.0.0.1:8090/naming/v1/routings/delete' \
-H "Authorization: $TOKEN" \
-H 'Content-Type: application/json' \
-d '[{"id":"<rule-id>"}]'{
"code": 200000,
"info": "execute success",
"amount": 1
}/naming/v1/routings/releasesAuth requiredPublish routing
Publish a release so clients observe the active view.
Parameters
- Authorizationheader · stringrequired
Token from login.
- (body)body · RuleRelease[]required
Request body is a JSON array of RuleRelease: [{...}, ...]. Fields below are the full per-item schema (including nested).
- idbody · stringoptional
id
- rule_idbody · stringoptional
rule_id
- rule_namebody · stringoptional
rule_name
- release_namebody · stringoptional
release_name
- descriptionbody · stringoptional
description
- release_typebody · stringoptional
release_type
- client_labelsbody · ClientLabel[]optional
client_labels
- keybody · stringoptional
key
- valuebody · MatchStringoptional
value
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- versionbody · uint64optional
version
- resourcebody · enum(RuleType)optional
resource enum:
Response fields
- codebody · uint32required
Business code; success is usually 200000.
- infobody · stringoptional
Info message.
- ruleReleasebody · RuleReleaseoptional
RuleRelease entity fields (batch APIs nest under responses[]).
- idbody · stringoptional
id
- rule_idbody · stringoptional
rule_id
- rule_namebody · stringoptional
rule_name
- release_namebody · stringoptional
release_name
- descriptionbody · stringoptional
description
- release_typebody · stringoptional
release_type
- client_labelsbody · ClientLabel[]optional
client_labels
- keybody · stringoptional
key
- valuebody · MatchStringoptional
value
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- versionbody · uint64optional
version
- resourcebody · enum(RuleType)optional
resource enum:
- activebody · booloptional
active
- ctimebody · stringoptional
ctime
- mtimebody · stringoptional
mtime
curl -sS -X POST 'http://127.0.0.1:8090/naming/v1/routings/releases' \
-H "Authorization: $TOKEN" \
-H 'Content-Type: application/json' \
-d '[{"id":"<rule-id>","release_type":"normal"}]'{
"code": 200000,
"info": "execute success",
"amount": 1
}/naming/v1/routings/releasesAuth requiredList routing releases
List published releases.
Parameters
- Authorizationheader · stringrequired
Token from login.
- idquery · stringoptional
Rule ID.
- limitquery · integeroptional
Page size.
curl -sS 'http://127.0.0.1:8090/naming/v1/routings/releases?limit=20' \
-H "Authorization: $TOKEN"{
"code": 200000,
"info": "execute success",
"amount": 1
}/naming/v1/routings/releases/rollbackAuth requiredRollback routing
Roll back to a release.
Parameters
- Authorizationheader · stringrequired
Token from login.
- (body)body · RuleRelease[]required
Request body is a JSON array of RuleRelease: [{...}, ...]. Fields below are the full per-item schema (including nested).
- idbody · stringoptional
id
- rule_idbody · stringoptional
rule_id
- rule_namebody · stringoptional
rule_name
- release_namebody · stringoptional
release_name
- descriptionbody · stringoptional
description
- release_typebody · stringoptional
release_type
- client_labelsbody · ClientLabel[]optional
client_labels
- keybody · stringoptional
key
- valuebody · MatchStringoptional
value
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- versionbody · uint64optional
version
- resourcebody · enum(RuleType)optional
resource enum:
Response fields
- codebody · uint32required
Business code; success is usually 200000.
- infobody · stringoptional
Info message.
- ruleReleasebody · RuleReleaseoptional
RuleRelease entity fields (batch APIs nest under responses[]).
- idbody · stringoptional
id
- rule_idbody · stringoptional
rule_id
- rule_namebody · stringoptional
rule_name
- release_namebody · stringoptional
release_name
- descriptionbody · stringoptional
description
- release_typebody · stringoptional
release_type
- client_labelsbody · ClientLabel[]optional
client_labels
- keybody · stringoptional
key
- valuebody · MatchStringoptional
value
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- versionbody · uint64optional
version
- resourcebody · enum(RuleType)optional
resource enum:
- activebody · booloptional
active
- ctimebody · stringoptional
ctime
- mtimebody · stringoptional
mtime
curl -sS -X PUT 'http://127.0.0.1:8090/naming/v1/routings/releases/rollback' \
-H "Authorization: $TOKEN" \
-H 'Content-Type: application/json' \
-d '[{"id":"<rule-id>"}]'{
"code": 200000,
"info": "execute success",
"amount": 1
}/naming/v1/routings/releases/stopbetaAuth requiredStop routing gray
Stop a gray release.
Parameters
- Authorizationheader · stringrequired
Token from login.
- (body)body · RuleRelease[]required
Request body is a JSON array of RuleRelease: [{...}, ...]. Fields below are the full per-item schema (including nested).
- idbody · stringoptional
id
- rule_idbody · stringoptional
rule_id
- rule_namebody · stringoptional
rule_name
- release_namebody · stringoptional
release_name
- descriptionbody · stringoptional
description
- release_typebody · stringoptional
release_type
- client_labelsbody · ClientLabel[]optional
client_labels
- keybody · stringoptional
key
- valuebody · MatchStringoptional
value
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- versionbody · uint64optional
version
- resourcebody · enum(RuleType)optional
resource enum:
Response fields
- codebody · uint32required
Business code; success is usually 200000.
- infobody · stringoptional
Info message.
- ruleReleasebody · RuleReleaseoptional
RuleRelease entity fields (batch APIs nest under responses[]).
- idbody · stringoptional
id
- rule_idbody · stringoptional
rule_id
- rule_namebody · stringoptional
rule_name
- release_namebody · stringoptional
release_name
- descriptionbody · stringoptional
description
- release_typebody · stringoptional
release_type
- client_labelsbody · ClientLabel[]optional
client_labels
- keybody · stringoptional
key
- valuebody · MatchStringoptional
value
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- versionbody · uint64optional
version
- resourcebody · enum(RuleType)optional
resource enum:
- activebody · booloptional
active
- ctimebody · stringoptional
ctime
- mtimebody · stringoptional
mtime
curl -sS -X PUT 'http://127.0.0.1:8090/naming/v1/routings/releases/stopbeta' \
-H "Authorization: $TOKEN" \
-H 'Content-Type: application/json' \
-d '[{"id":"<rule-id>"}]'{
"code": 200000,
"info": "execute success",
"amount": 1
}/naming/v1/routings/releases/deleteAuth requiredDelete releases
Delete releases.
Parameters
- Authorizationheader · stringrequired
Token from login.
- (body)body · RuleRelease[]required
JSON array of RuleRelease; fields below are per-item.
- idbody · stringoptional
id
- rule_idbody · stringoptional
rule_id
- rule_namebody · stringoptional
rule_name
- release_namebody · stringoptional
release_name
- descriptionbody · stringoptional
description
- release_typebody · stringoptional
release_type
- client_labelsbody · ClientLabel[]optional
client_labels
- keybody · stringoptional
key
- valuebody · MatchStringoptional
value
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- versionbody · uint64optional
version
- resourcebody · enum(RuleType)optional
resource enum:
Response fields
- codebody · uint32required
Business code.
- infobody · stringoptional
Info.
- RuleReleasebody · RuleReleaseoptional
Entity fields.
- idbody · stringoptional
id
- rule_idbody · stringoptional
rule_id
- rule_namebody · stringoptional
rule_name
- release_namebody · stringoptional
release_name
- descriptionbody · stringoptional
description
- release_typebody · stringoptional
release_type
- client_labelsbody · ClientLabel[]optional
client_labels
- keybody · stringoptional
key
- valuebody · MatchStringoptional
value
- typebody · enum(MatchStringType)optional
type enum: EXACT | REGEX | NOT_EQUALS | IN | NOT_IN | RANGE
- valuebody · stringoptional
value
- value_typebody · enum(ValueType)optional
value_type enum: TEXT | PARAMETER
- versionbody · uint64optional
version
- resourcebody · enum(RuleType)optional
resource enum:
- activebody · booloptional
active
- ctimebody · stringoptional
ctime
- mtimebody · stringoptional
mtime
curl -sS -X POST 'http://127.0.0.1:8090/naming/v1/routings/releases/delete' \
-H "Authorization: $TOKEN" \
-H 'Content-Type: application/json' \
-d '[]'{
"code": 200000,
"info": "execute success"
}