调用ListGreyTagRoute接口根据应用ID查询灰度规则详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求头
该接口使用公共请求头,无特殊请求头。更多信息,请参见公共请求和返回头。
请求语法
GET /pop/v1/sam/tagroute/greyTagRouteList HTTP/1.1
请求参数
名称 | 类型 | 位置 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|---|
AppId | String | Query | 是 | 7171a6ca-d1cd-4928-8642-7d5cfe69**** |
应用ID。 |
- ScRule参数说明
参数名称 |
类型 |
示例 |
描述 |
---|---|---|---|
condition |
String |
OR |
灰度规则的条件模式。取值说明如下:
|
path |
String |
/path |
Spring Cloud应用灰度规则对应的path。 |
items |
Array of items |
条件列表。 |
参数名称 |
类型 |
示例 |
描述 |
---|---|---|---|
name |
String |
test |
参数名。 |
cond |
String |
== |
比较操作符。可取值:>、<、>=、<=、==以及!=。 |
type |
String |
cookie |
比较类型。取值说明如下:
|
value |
String |
test |
参数取值,根据type和name得到的值跟这个值进行比较。 |
operator |
String |
rawvalue |
运算符。取值说明如下:
|
- DubboRule参数说明
参数名称 |
类型 |
示例 |
描述 |
---|---|---|---|
condition |
String |
OR |
灰度规则的条件模式。取值说明如下:
|
methodName |
String |
echo |
Dubbo服务的方法名。 |
serviceName |
String |
com.alibaba.edas.boot.EchoService |
Dubbo服务名称。 |
version |
String |
1.0.0 |
Dubbo服务版本。 |
items |
Array of items |
条件列表。 |
|
group |
String |
DUBBO |
灰度规则对应的Dubbo服务的分组。 |
参数名称 |
类型 |
示例 |
描述 |
---|---|---|---|
index |
Integer |
0 |
参数编号,0表示第一个参数。 |
expr |
String |
.name |
参数值获取表达式。语法遵循SpEL(link)表达式,取值说明如下:
|
cond |
String |
== |
比较操作符。可取值:>、<、>=、<=、==以及!=。 |
value |
String |
test |
参数取值,根据expr和index得到的值跟这个值进行比较。 |
operator |
String |
rawvalue |
运算符。取值说明如下:
|
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 9D29CBD0-45D3-410B-9826-52F86F90**** |
请求ID。 |
Message | String | success |
附加信息。取值说明如下:
|
TraceId | String | 0a98a02315955564772843261e**** |
调用链ID,用于精确查询调用信息。 |
Data | Object |
灰度规则信息。 |
|
CurrentPage | Integer | 1 |
当前页码。 |
PageSize | Integer | 1 |
分页查询时设置的每页数量。目前只能为1。 |
TotalSize | Long | 1 |
总个数。目前只能为1。 |
Result | Array of result |
返回结果。 |
|
GreyTagRouteId | Long | 1 |
规则ID。 |
Name | String | rule-name |
规则名称。 |
Description | String | test |
规则描述。 |
ScRules | Array of scRule |
Spring Cloud灰度规则。 |
|
path | String | /path |
Spring Cloud应用灰度规则对应的路径。 |
condition | String | OR |
灰度规则的条件模式。取值说明如下:
|
items | Array of item |
条件列表。 |
|
type | String | cookie |
比较类型。取值说明如下:
|
name | String | test |
参数名。 |
operator | String | rawvalue |
运算符。取值说明如下:
|
value | String | test |
参数取值,根据type和name得到的值跟这个值进行比较。 |
cond | String | == |
比较操作符。可取值:>、<、>=、<=、==以及!=。 |
index | Integer | N/A |
Spring Cloud应用不涉及。 |
expr | String | N/A |
Spring Cloud应用不涉及。 |
AlbRules | Array of albRule | ||
serviceId | String | 22 |
路由服务ID。 |
ingressId | String | 23 |
网关路由ID。 |
condition | String | AND |
灰度规则的条件模式,当前只支持AND:表示同时满足条件列表中的所有条件。 |
items | Array of item | ||
type | String | cookie |
比较类型。取值说明如下:
|
name | String | example |
参数名。 |
operator | String | rawvalue |
运算符。取值说明如下:目前只支持rawvalue:直接比较。 |
value | String | test |
参数取值,根据type和name得到的值跟这个值进行比较。 |
cond | String | == |
暂支持==。 |
index | Integer | N/A |
Alb应用无需填写。 |
expr | String | N/A |
Alb应用无需填写。 |
DubboRules | Array of dubboRule |
Dubbo服务灰度规则。 |
|
serviceName | String | com.alibaba.edas.boot.EchoService |
Dubbo服务名称。 |
group | String | DUBBO |
灰度规则对应的Dubbo服务的分组。 |
version | String | 1.0.0 |
Dubbo服务版本。 |
methodName | String | echo |
Dubbo服务的方法名。 |
condition | String | OR |
灰度规则的条件模式。取值说明如下:
|
items | Array of item |
条件列表。 |
|
index | Integer | 0 |
参数编号,0表示第一个参数。 |
expr | String | .name |
参数值获取表达式。语法遵循SpEL(link)表达式,取值说明如下:
|
operator | String | rawvalue |
运算符。取值说明如下:
|
value | String | test |
参数取值,根据expr和index得到的值跟这个值进行比较。 |
cond | String | == |
比较操作符。可取值:>、<、>=、<=、==以及!=。 |
type | String | N/A |
Dubbo服务不涉及。 |
name | String | N/A |
Dubbo服务不涉及。 |
CreateTime | Long | 1619007592013 |
规则被创建的时间戳。单位:毫秒。 |
UpdateTime | Long | 1609434061000 |
规则被更新的时间戳。单位:毫秒。 |
ErrorCode | String | 空 |
错误码。取值说明如下:
|
Code | String | 200 |
接口状态或POP错误码。取值说明如下:
|
Success | Boolean | true |
查询变更单信息是否成功。取值说明如下:
|
示例
请求示例
GET /pop/v1/sam/tagroute/greyTagRouteList?AppId=7171a6ca-d1cd-4928-8642-7d5cfe69**** HTTP/1.1
Host:sae.aliyuncs.com
Content-Type:application/json
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<ListGreyTagRouteResponse>
<RequestId>9D29CBD0-45D3-410B-9826-52F86F90****</RequestId>
<Message>success</Message>
<TraceId>0a98a02315955564772843261e****</TraceId>
<Data>
<CurrentPage>1</CurrentPage>
<PageSize>1</PageSize>
<TotalSize>1</TotalSize>
<Result>
<GreyTagRouteId>1</GreyTagRouteId>
<Name>rule-name</Name>
<Description>test</Description>
<ScRules>
<path>/path</path>
<condition>OR</condition>
<items>
<type>cookie</type>
<name>test</name>
<operator>rawvalue</operator>
<value>test</value>
<cond>==</cond>
<expr>N/A</expr>
</items>
</ScRules>
<DubboRules>
<serviceName>com.alibaba.edas.boot.EchoService</serviceName>
<group>DUBBO</group>
<version>1.0.0</version>
<methodName>echo</methodName>
<condition>OR</condition>
<items>
<index>0</index>
<expr>.name</expr>
<operator>rawvalue</operator>
<value>test</value>
<cond>==</cond>
<type>N/A</type>
<name>N/A</name>
</items>
</DubboRules>
<CreateTime>1619007592013</CreateTime>
<UpdateTime>1609434061000</UpdateTime>
</Result>
</Data>
<Code>200</Code>
<Success>true</Success>
</ListGreyTagRouteResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "9D29CBD0-45D3-410B-9826-52F86F90****",
"Message" : "success",
"TraceId" : "0a98a02315955564772843261e****",
"Data" : {
"CurrentPage" : 1,
"PageSize" : 1,
"TotalSize" : 1,
"Result" : [ {
"GreyTagRouteId" : 1,
"Name" : "rule-name",
"Description" : "test",
"ScRules" : [ {
"path" : "/path",
"condition" : "OR",
"items" : [ {
"type" : "cookie",
"name" : "test",
"operator" : "rawvalue",
"value" : "test",
"cond" : "==",
"expr" : "N/A"
} ]
} ],
"DubboRules" : [ {
"serviceName" : "com.alibaba.edas.boot.EchoService",
"group" : "DUBBO",
"version" : "1.0.0",
"methodName" : "echo",
"condition" : "OR",
"items" : [ {
"index" : 0,
"expr" : ".name",
"operator" : "rawvalue",
"value" : "test",
"cond" : "==",
"type" : "N/A",
"name" : "N/A"
} ]
} ],
"CreateTime" : 1619007592013,
"UpdateTime" : 1609434061000
} ]
},
"Code" : "200",
"Success" : true
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidParameter.NotEmpty | You must specify the parameter %s. | 不合法的参数:%s不能为空。 |
400 | InvalidParameter.Obviously | The specified parameter is invalid {%s}. | 不合法的参数{%s}。 |
400 | InvalidParameter.WithMessage | The parameter is invalid {%s}: %s | 不合法的参数{%s}:%s。 |
访问错误中心查看更多错误码。