Querying Virtual Hosts
Function
This API is used to query virtual hosts.
URI
GET /v2/rabbitmq/{project_id}/instances/{instance_id}/vhosts
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. For details, see Obtaining a Project ID. |
instance_id | Yes | String | Instance ID. |
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 ShowVhostDetailResp objects | Queried virtual host details. |
Parameter | Type | Description |
---|---|---|
name | String | Virtual host name. |
tracing | Boolean | Indicates whether to enable message tracing. |
Example Requests
Querying virtual hosts
GET https://{endpoint}/v2/rabbitmq/{project_id}/instances/{instance_id}/vhosts?offset=0&limit=10
Example Responses
Status code: 200
Successful
{"size" : 10,"total" : 13,"items" : [ {"name" : "/","tracing" : false}, {"name" : "test-vhost1","tracing" : false}, {"name" : "test-vhost10","tracing" : false}, {"name" : "test-vhost2","tracing" : false}, {"name" : "test-vhost3","tracing" : false}, {"name" : "test-vhost4","tracing" : false}, {"name" : "test-vhost5","tracing" : false}, {"name" : "test-vhost6","tracing" : false}, {"name" : "test-vhost7","tracing" : false}, {"name" : "test-vhost8","tracing" : false} ]}
Status Codes
Status Code | Description |
---|---|
200 | Successful |
Error Codes
See Error Codes.
- URI