1.接口协议:
GET https://[endpoint].ctapi.ctyun.cn/v2/binding/query
请求参数 | 是否必填 | 位置 | 参数类型 | 说明 |
prodInstId | 是 | url | String | 实例ID |
vhost | 否 | url | String | vhost名称 |
响应参数 | 参数类型 | 描述 |
statusCode | String | 接口系统层面状态码。成功:800,失败:900 |
message | String | 描述状态 |
returnObj | List<Map> | 返回对象。此参数所包含的参数请见“响应示例"里面的注释 |
返回值data参数说明
参数名 | 参数类型 | 说明 |
source | String | 绑定来源 |
vhost | String | 虚拟机 |
destination | String | 绑定目标 |
destination_type | String | 绑定目标类型 |
routing_key | String | 路由键 |
arguments | Map | 绑定参数 |
properties_key | String | properties键 |
2.请求示例:
GET https://[endpoint].ctapi.ctyun.cn/v2/binding/query?prodInstId=9b9bea76b7ce412ca18f99ccc1ea717b&vhost=/
3.返回示例:
成功响应示例
{
"returnObj": {
"data": [
{
"source": "ex1",
"vhost": "/",
"destination": "ex2",
"destination_type": "exchange",
"routing_key": "qaz",
"arguments": {},
"properties_key": "qaz"
},
{
"source": "ex1",
"vhost": "/",
"destination": "qu1",
"destination_type": "queue",
"routing_key": "qwer",
"arguments": {},
"properties_key": "qwer"
}
]
},
"message": "success",
"statusCode": "800"
}
失败响应示例
{
"returnObj": {
"data": "{\"error\":\"not_found\",\"reason\":\"vhost_not_found\"}"
},
"message": "...",
"statusCode": "900"
}