post
/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"
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
200
Interface added
Content-Type: application/json
id
string<uuid>optionalRouter ID
subnet_id
string<uuid>optionalport_id
string<uuid>optionalnetwork_id
string<uuid>optional400
Invalid request parameters
Content-Type: application/json
error
objectrequired401
Authentication required or token invalid
Content-Type: application/json
error
objectrequired404
Resource not found
Content-Type: application/json
error
objectrequired409
Subnet already connected to a router
Content-Type: application/json
error
objectrequired500
Internal 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"}'