Querying Bindings of an Exchange
Function
This API is used to query bindings of an exchange.
Calling Method
For details, see Calling APIs.
URI
GET /v2/rabbitmq/{project_id}/instances/{instance_id}/vhosts/{vhost}/exchanges/{exchange}/binding
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details, see Obtaining a Project ID. |
| instance_id | Yes | String | Instance ID. |
| vhost | Yes | String | Virtual host name. If the name contains a slash (/), replace it with __F_SLASH__. Otherwise, the calling fails. For example, if the virtual host name is /test, the input parameter is __F_SLASH__test. |
| exchange | Yes | String | Exchange name. |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| size | Integer | Number of displayed records. |
| total | Integer | Total number of results in a query. |
| items | Array of BindingsDetails objects | Binding details. |
| Parameter | Type | Description |
|---|---|---|
| source | String | Definition: Exchange name. Range: N/A |
| destination_type | String | Definition Type of the binding target. Range |
| destination | String | Definition Binding target. Range N/A |
| routing_key | String | Definition: Binding key-value. Range: N/A |
| properties_key | String | Definition: URL-translated routing key. Range: N/A |
Example Requests
Querying bindings of an exchange
GET /v2/rabbitmq/{project_id}/instances/{instance_id}/vhosts/{vhost}/exchanges/{exchange}/binding Example Responses
Status code: 200
Binding list of the exchange queried.
{
"size" : 1,
"total" : 1,
"items" : [ {
"source" : "exchange-test",
"destination_type" : "queue",
"destination" : "queue-test",
"routing_key" : "test-routing-key",
"properties_key" : "test-routing-key"
} ]
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Binding list of the exchange queried. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.