/v1/routers/{router_id}/add-interfaceAdd router interface
Add an interface (subnet or port) to a router
Path Parameters
router_id
string<uuid>requiredpath
Router ID
Example: "550e8400-e29b-41d4-a716-446655440000"
Header Parameters
X-Region
stringrequiredheader
Region code to query resources from. Required for all resource operations.
Example: "sao1"
Request Body
requiredContent-Type: application/json
subnet_id
string<uuid>optionalSubnet to connect (mutually exclusive with port_id)
port_id
string<uuid>optionalPort to connect (mutually exclusive with subnet_id)
Responses
Interface added
Content-Type: application/json
id
string<uuid>optionalRouter ID
subnet_id
string<uuid>optionalport_id
string<uuid>optionalInvalid request parameters
Content-Type: application/json
error
objectrequiredAuthentication required or token invalid
Content-Type: application/json
error
objectrequiredResource not found
Content-Type: application/json
error
objectrequiredSubnet already connected to a router
Content-Type: application/json
error
objectrequiredInternal server error
Content-Type: application/json
error
objectrequiredcurl -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"}'
Response
Interface added
{"id": "550e8400-e29b-41d4-a716-446655440000","subnet_id": "550e8400-e29b-41d4-a716-446655440000","port_id": "550e8400-e29b-41d4-a716-446655440000"}