CreateMulticastRouter

API Request

URLs
POST zstack/v1/multicast/virtual-routers
Headers
Authorization: OAuth the-session-uuid
Body
{   "params": {     "vpcRouterVmUuid": "6fe7772600d039bf80d8e2359fcef61a",     "description": "this is a header router for test"   },   "systemTags": [],   "userTags": [] }
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X POST -d '{"params":{"vpcRouterVmUuid":"6fe7772600d039bf80d8e2359fcef61a","description":"this is a header router for test"}}' http://localhost:8080/zstack/v1/multicast/virtual-routers
Request Parameters
Name Type Location Description Optional Value Starting Version
vpcRouterVmUuid String body (contained in the params structure) 3.7.0
description String body (contained in the params structure) Optional. The detailed description of the resource. 3.7.0
resourceUuid String body (contained in the params structure) Optional. The resource UUID. 3.7.0
tagUuids List body (contained in the params structure) Optional. The tag UUID list. 3.7.0
systemTags List body Optional. The system tags. 3.7.0
userTags List body Optional. The user tags. 3.7.0

API Response

Sample Response
{   "inventory": {     "uuid": "974c38ae483737c3b4ded18de56773b6",     "description": "test for header",     "rpGroups": [       {         "uuid": "0bda384377d53656b89270948f795ab8",         "multicastRouterUuid": "974c38ae483737c3b4ded18de56773b6",         "rpAddress": "1.2.3.4",         "groupAddress": "239.1.1.1/32"       }     ],     "vpcVrs": []   } }
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.7.0
inventory MulticastRouterInventory See inventory. 3.7.0
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 3.7.0
description String The brief description of the error. 3.7.0
details String The details about the error. 3.7.0
elaboration String The reserved field. Default value: null. 3.7.0
opaque LinkedHashMap The reserved field. Default value: null. 3.7.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.7.0
#inventory
Name Type Description Starting Version
uuid String The resource UUID. 3.7.0
vpcRouterUuid String 3.7.0
description String The detailed description of the resource. 3.7.0
state String 3.7.0
createDate Timestamp The creation date. 3.7.0
lastOpDate Timestamp The last operation date. 3.7.0
rpGroups List See rpGroups. 3.7.0
vpcVrs List See vpcVrs. 3.7.0
#rpGroups
Name Type Description Starting Version
uuid String The resource UUID. 3.7.0
multicastRouterUuid String 3.7.0
rpAddress String 3.7.0
groupAddress String 3.7.0
createDate Timestamp The creation date. 3.7.0
lastOpDate Timestamp The last operation date. 3.7.0
#vpcVrs
Name Type Description Starting Version
uuid String The resource UUID. 3.7.0
vpcRouterUuid String 3.7.0

SDK Sample

Java SDK
CreateMulticastRouterAction action = new CreateMulticastRouterAction(); action.vpcRouterVmUuid = "6fe7772600d039bf80d8e2359fcef61a"; action.description = "this is a header router for test"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; CreateMulticastRouterAction.Result res = action.call();
Python SDK
CreateMulticastRouterAction action = CreateMulticastRouterAction() action.vpcRouterVmUuid = "6fe7772600d039bf80d8e2359fcef61a" action.description = "this is a header router for test" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" CreateMulticastRouterAction.Result res = action.call()

DeleteMulticastRouter

API Request

URLs
DELETE zstack/v1/multicast/virtual-routers/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X DELETE http://localhost:8080/zstack/v1/multicast/virtual-routers/cce17d3b823933a8b0694af5159fed4d?deleteMode=Permissive
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID. 3.7.0
deleteMode String body Optional. The delete mode. 3.7.0
systemTags List body Optional. The system tags. 3.7.0
userTags List body Optional. The user tags. 3.7.0

API Response

When the API succeeded, an empty JSON structure {} is returned. When the API failed, the returned JSON structure includes an error field. For example,
{ 	"error": { 		"code": "SYS.1001", 		"description": "A message or a operation timeout", 		"details": "Create VM on KVM timeout after 300s" 	} }

SDK Sample

Java SDK
DeleteMulticastRouterAction action = new DeleteMulticastRouterAction(); action.uuid = "cce17d3b823933a8b0694af5159fed4d"; action.deleteMode = "Permissive"; action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; DeleteMulticastRouterAction.Result res = action.call();
Python SDK
DeleteMulticastRouterAction action = DeleteMulticastRouterAction() action.uuid = "cce17d3b823933a8b0694af5159fed4d" action.deleteMode = "Permissive" action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" DeleteMulticastRouterAction.Result res = action.call()

QueryMulticastRouter

API Request

URLs
GET zstack/v1/multicast/virtual-routers GET zstack/v1/multicast/virtual-routers/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X GET http://localhost:8080/zstack/v1/multicast/virtual-routers?q=name=multicastRouter
curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X GET http://localhost:8080/zstack/v1/multicast/virtual-routers/83791299370039dba6b9318e46dfcf69

Queryable Fields

You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QueryMulticastRouter, and pressing the Tab key.

API Response

Sample Response
{   "inventories": [     {       "uuid": "df41b45fd5213ceab084e5b733886ac0",       "description": "test for header",       "rpGroups": [         {           "uuid": "08f7436a526b3cbab51ca95d9e578d27",           "multicastRouterUuid": "df41b45fd5213ceab084e5b733886ac0",           "rpAddress": "1.2.3.4",           "groupAddress": "239.1.1.1/32"         }       ],       "vpcVrs": []     }   ] }
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.7.0
inventories List See inventories. 3.7.0
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 3.7.0
description String The brief description of the error. 3.7.0
details String The details about the error. 3.7.0
elaboration String The reserved field. Default value: null. 3.7.0
opaque LinkedHashMap The reserved field. Default value: null. 3.7.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.7.0
#inventories
Name Type Description Starting Version
uuid String The resource UUID. 3.7.0
vpcRouterUuid String 3.7.0
description String The detailed description of the resource. 3.7.0
state String 3.7.0
createDate Timestamp The creation date. 3.7.0
lastOpDate Timestamp The last operation date. 3.7.0
rpGroups List See rpGroups. 3.7.0
vpcVrs List See vpcVrs. 3.7.0
#rpGroups
Name Type Description Starting Version
uuid String The resource UUID. 3.7.0
multicastRouterUuid String 3.7.0
rpAddress String 3.7.0
groupAddress String 3.7.0
createDate Timestamp The creation date. 3.7.0
lastOpDate Timestamp The last operation date. 3.7.0
#vpcVrs
Name Type Description Starting Version
uuid String The resource UUID. 3.7.0
vpcRouterUuid String 3.7.0

SDK Sample

Java SDK
QueryMulticastRouterAction action = new QueryMulticastRouterAction(); action.conditions = asList("name=multicastRouter"); action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"; QueryMulticastRouterAction.Result res = action.call();
Python SDK
QueryMulticastRouterAction action = QueryMulticastRouterAction() action.conditions = ["name=multicastRouter"] action.sessionId = "b86c9016b4f24953a9edefb53ca0678c" QueryMulticastRouterAction.Result res = action.call()




Back to Top

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.