router

Create router

Creates a new router. Routers can be used to connect multiple Private Networks. Cloud Servers on any attached network can communicate directly with each other.

post/1.3/router

Request

  • Base URL: https://api.upcloud.com
  • URL: https://api.upcloud.com/1.3/router
  • Auth: HTTP bearer

Request body

Example request

{
  "router": {
    "name": "Example router",
    "static_routes": [
      {
        "name": "static-route-0",
        "nexthop": "192.168.1.1",
        "route": "0.0.0.0/0"
      }
    ]
  }
}

Response

Router created successfully.

Example response

{
  "router": {
    "attached_network_gateways": [],
    "attached_networks": {
      "network": [
        {
          "uuid": "03804f7f-828a-4610-867f-9d62cf9fc14f"
        }
      ]
    },
    "name": "Example router",
    "static_routes": [
      {
        "name": "static-route-0",
        "nexthop": "192.168.1.1",
        "route": "0.0.0.0/0",
        "type": "user"
      }
    ],
    "labels": [],
    "type": "normal",
    "uuid": "0414e0d7-4436-4037-9dd8-6eaf47dce599"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.