获取消费者授权规则。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
apig:GetConsumerAuthorizationRule |
none |
*Domain
|
无 | 无 |
请求语法
GET /v1/consumers/{consumerId}/authorization-rules/{consumerAuthorizationRuleId} HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| consumerAuthorizationRuleId |
string |
否 |
根据特定的消费者授权规则 ID 过滤接口列表,响应中的接口列表仅包含已授权的接口。 |
car-ctgdn8em1hko5krqq03g |
| consumerId |
string |
否 |
消费者 ID。 |
cs-ctgdn2um1hkossul8gvg |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
当前API无需请求参数
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| requestId |
string |
Id of the request |
53102737-1E4E-5A8B-8E0A-4184B0959B84 |
| consumerId |
string |
消费者 ID。 |
cs-ctgdn2um1hkossul8gvg |
| consumerAuthorizationRuleId |
string |
根据特定的消费者授权规则 ID 过滤接口列表,响应中的接口列表仅包含已授权的接口。 |
car-ctgdn8em1hko5krqq03g |
| apiInfo | HttpApiApiInfo |
API 信息。 |
|
| environmentInfo | EnvironmentInfo |
环境信息。 |
|
| gatewayInfo | GatewayInfo |
网关信息。 |
|
| resourceType |
string |
资源类型。 |
API |
| expireStatus |
string |
失效状态。 |
true |
| expireMode |
string |
失效模式。LongTerm、ShortTerm,二选一。 |
LongTerm |
| expireTimestamp |
integer |
到期时间。 |
1750852089975 |
| createTimestamp |
integer |
创建时间戳。单位: 毫秒。 |
1750852089975 |
| updateTimestamp |
integer |
更新时间戳。单位: 毫秒。 |
1750852089975 |
| deployStatus |
string |
API 在当前环境的发布状态 |
"" |
示例
正常返回示例
JSON格式
{
"requestId": "53102737-1E4E-5A8B-8E0A-4184B0959B84",
"consumerId": "cs-ctgdn2um1hkossul8gvg",
"consumerAuthorizationRuleId": "car-ctgdn8em1hko5krqq03g",
"environmentInfo": {
"environmentId": "env-cq7l5s5lhtgi6qasrdc0",
"name": "test",
"alias": "测试环境",
"description": "这是xxx的xx项目测试环境",
"gatewayInfo": {
"gatewayId": "gw-cq7og15lhtgi6qasrj60",
"name": "apitest-gw",
"vpcInfo": {
"vpcId": "vpc-uf664nyle5kh***",
"name": "商品中心预发环境专有网络"
},
"engineVersion": "2.0.7",
"gatewayEdition": "MultiTenantServerless"
},
"subDomainInfos": [
{
"domainId": "d-cpudb0llhtgl2djvq2sg",
"name": "abc.com",
"protocol": "HTTP",
"networkType": "Intranet"
}
],
"default": false,
"createTimestamp": 1721116090326,
"updateTimestamp": 1721116090326,
"resourceGroupId": "rg-xxxx"
},
"gatewayInfo": {
"gatewayId": "gw-cq7og15lhtgi6qasrj60",
"name": "apitest-gw",
"vpcInfo": {
"vpcId": "vpc-uf664nyle5kh***",
"name": "商品中心预发环境专有网络"
},
"engineVersion": "2.0.7",
"gatewayEdition": "MultiTenantServerless"
},
"resourceType": "API",
"expireStatus": "true",
"expireMode": "LongTerm",
"expireTimestamp": 1750852089975,
"createTimestamp": 1750852089975,
"updateTimestamp": 1750852089975,
"deployStatus": "\"\""
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。