Querying an Instance Broker
Function
This APi is used to query instance broker information.
URI
GET /v2/{project_id}/{engine}/instances/{instance_id}/nodes
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. For details about how to obtain it, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
| engine | Yes | String | Definition Message engine type. Constraints N/A Range N/A Default Value N/A |
| instance_id | Yes | String | Definition Instance ID. You can call the API for querying all instances to obtain the instance ID. The instance ID is in the response body. Constraints N/A Range N/A Default Value N/A |
Request Parameters
None
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| nodes | Array of NodeContextEntity objects | Definition Background task ID. Constraints N/A Range N/A Default Value N/A |
| total | Integer | Definition Total number. Constraints N/A Range N/A Default Value N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition ID. Constraints N/A Range N/A Default Value N/A |
| broker_name | String | Definition Broker name. Constraints N/A Range N/A Default Value N/A |
| broker_id | Integer | Definition Broker ID. Constraints N/A Range N/A Default Value N/A |
| address | String | Definition Address. Constraints N/A Range N/A Default Value N/A |
| public_address | String | Definition Public IP address. Constraints N/A Range N/A Default Value N/A |
Example Requests
GET https://{endpoint}/v2/{project_id}/{engine}/instances/{instance_id}/nodes Example Responses
Status code: 200
Successful
{
"total" : 2,
"nodes" : [ {
"id" : "node-1",
"broker_name" : "broker-name-1",
"broker_id" : "broker-1",
"address" : "0.0.0.2",
"public_address" : "1.0.0.2"
}, {
"id" : "node-2",
"broker_name" : "broker-name-2",
"broker_id" : "broker-2",
"address" : "0.0.0.1",
"public_address" : "1.0.0.1"
} ]
} 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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot