调用DescribeGreyTagRoute接口根据规则ID查询灰度规则详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求头
该接口使用公共请求头,无特殊请求头。更多信息,请参见公共请求和返回头。
请求语法
GET /pop/v1/sam/tagroute/greyTagRoute HTTP/1.1
请求参数
名称 | 类型 | 位置 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|---|
GreyTagRouteId | Long | Query | 是 | 1 |
规则ID。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 9D29CBD0-45D3-410B-9826-52F86F90**** |
请求ID。 |
Message | String | success |
调用结果的附加信息。 |
TraceId | String | 0a98a02315955564772843261e**** |
调用链ID,用于精确查询调用信息。 |
Data | Object |
灰度规则信息。 |
|
GreyTagRouteId | Long | 16 |
灰度规则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 Scrulesitem |
条件列表。 |
|
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 Scrulesitem | ||
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 |
参数值获取表达式。取值说明如下:
|
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 |
规则被更新的时间戳。单位:毫秒。 |
AppId | String | 3faaf993-7aed-4bcd-b189-625e6a5a**** |
应用ID。 |
ErrorCode | String | 空 |
错误码。取值说明如下:
|
Code | String | 200 |
接口状态或POP错误码。取值说明如下:
|
Success | Boolean | true |
查询变更单信息是否成功。取值说明如下:
|
示例
请求示例
GET /pop/v1/sam/tagroute/greyTagRoute?GreyTagRouteId=1 HTTP/1.1
Host:sae.aliyuncs.com
Content-Type:application/json
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeGreyTagRouteResponse>
<RequestId>9D29CBD0-45D3-410B-9826-52F86F90****</RequestId>
<Message>success</Message>
<TraceId>0a98a02315955564772843261e****</TraceId>
<Data>
<GreyTagRouteId>16</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>
<AppId>3faaf993-7aed-4bcd-b189-625e6a5a****</AppId>
</Data>
<Code>200</Code>
<Success>true</Success>
</DescribeGreyTagRouteResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "9D29CBD0-45D3-410B-9826-52F86F90****",
"Message" : "success",
"TraceId" : "0a98a02315955564772843261e****",
"Data" : {
"GreyTagRouteId" : 16,
"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,
"AppId" : "3faaf993-7aed-4bcd-b189-625e6a5a****"
},
"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。 |
访问错误中心查看更多错误码。