Querying Exchanges
Function
This API is used to query exchanges.
Calling Method
For details, see Calling APIs.
URI
GET /v2/rabbitmq/{project_id}/instances/{instance_id}/vhosts/{vhost}/exchanges
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
instance_id |
Yes |
String |
Instance ID. |
|
vhost |
Yes |
String |
Virtual host name. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
offset |
No |
Integer |
Offset, which is the position where the query starts. The value must be greater than or equal to 0. |
|
limit |
No |
Integer |
Number of records on each page. Value range: 0–50. The default value is 10. |
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 ExchangeDetails objects |
Details of an exchange. |
|
Parameter |
Type |
Description |
|---|---|---|
|
durable |
Boolean |
Indicates whether data persistence is enabled. |
|
default |
Boolean |
Indicates whether the exchange is default. |
|
internal |
Boolean |
Indicates whether the exchange is internal. |
|
name |
String |
Exchange name. |
|
auto_delete |
Boolean |
Indicates whether automatic deletion is enabled. |
|
type |
String |
Exchange type. |
|
vhost |
String |
Virtual host. |
Example Requests
Querying exchanges
GET /v2/rabbitmq/{project_id}/instances/{instance_id}/exchanges?offset=0&limit=10
Example Responses
Status code: 200
Successful
{
"total" : 1,
"size" : 1,
"items" : [ {
"durable" : true,
"default" : false,
"internal" : false,
"name" : "default",
"auto_delete" : false,
"type" : "direct"
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Successful |
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.