ByCloud Docs
GuidesCLIAPISDK
post/v1/routers/{router_id}/add-interface

Add router interface

Add an interface (subnet or port) to a router

Path Parameters

router_id

string<uuid>required

path

Router ID

Example: "550e8400-e29b-41d4-a716-446655440000"

Request Body

required

Content-Type: application/json

subnet_id

string<uuid>optional

Subnet to connect (mutually exclusive with port_id)

port_id

string<uuid>optional

Port to connect (mutually exclusive with subnet_id)

Responses

200

Interface added

Content-Type: application/json

id

string<uuid>optional

Router ID

subnet_id

string<uuid>optional

port_id

string<uuid>optional

network_id

string<uuid>optional
400

Invalid request parameters

Content-Type: application/json

error

objectrequired
401

Authentication required or token invalid

Content-Type: application/json

error

objectrequired
404

Resource not found

Content-Type: application/json

error

objectrequired
409

Subnet already connected to a router

Content-Type: application/json

error

objectrequired
500

Internal server error

Content-Type: application/json

error

objectrequired
curl -X POST "https://api.spo1.mycloud.com/v1/routers/550e8400-e29b-41d4-a716-446655440000/add-interface" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"subnet_id": "550e8400-e29b-41d4-a716-446655440000",
"port_id": "550e8400-e29b-41d4-a716-446655440000"
}'