[
{
"name": "demo-1212312312312312313",
"namespace": "",
"enable": true,
"routing_policy": "RulePolicy",
"metadata":{"key1":"value1","key2":"value2"},
"routing_config": {
"@type": "type.googleapis.com/v1.RuleRoutingConfig",
"rules": [
{
"name": "规则一",
"sources": [
{
"service": "polaris.checker2131231231212",
"namespace": "Polaris",
"arguments": [
{
"type": "CUSTOM",
"key": "uid",
"value": {
"type": "EXACT",
"value": "123",
"value_type": "TEXT"
}
}
]
}
],
"destinations": [
{
"service": "polaris.checker",
"namespace": "Polaris",
"priority": 0,
"weight": 100,
"transfer": "",
"isolate": false,
"name": "1.规则0.分组1"
}
]
}
]
}
}
]curl --location --request POST 'http://119.91.66.223:8090/naming/v2/routings' \
--header 'X-Polaris-Token;' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"name": "demo-1212312312312312313",
"namespace": "",
"enable": true,
"routing_policy": "RulePolicy",
"metadata":{"key1":"value1","key2":"value2"},
"routing_config": {
"@type": "type.googleapis.com/v1.RuleRoutingConfig",
"rules": [
{
"name": "规则一",
"sources": [
{
"service": "polaris.checker2131231231212",
"namespace": "Polaris",
"arguments": [
{
"type": "CUSTOM",
"key": "uid",
"value": {
"type": "EXACT",
"value": "123",
"value_type": "TEXT"
}
}
]
}
],
"destinations": [
{
"service": "polaris.checker",
"namespace": "Polaris",
"priority": 0,
"weight": 100,
"transfer": "",
"isolate": false,
"name": "1.规则0.分组1"
}
]
}
]
}
}
]'{
"code": 0,
"info": "string"
}