Skip to main content
POST
/
api
/
v2
/
networks
Create network
curl --request POST \
  --url https://api.example.com/api/v2/networks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {
    "name": "network-name",
    "description": "A verbose description",
    "tags": [
      {
        "name": "cluster-id",
        "value": "9361402c-f998-49cc-ab21-9bb99afcfde8"
      }
    ]
  },
  "spec": {
    "organizationId": "161b9d5a-701d-4fea-848d-0e345edf16e9",
    "projectId": "f113be96-4dd2-4c14-9c0e-e96c500f21e0",
    "regionId": "c7568e2d-f9ab-453d-9a3a-51375f78426b",
    "prefix": "192.168.0.0/24",
    "dnsNameservers": [
      "8.8.8.8"
    ],
    "routes": [
      {
        "prefix": "10.0.0.0/8",
        "nexthop": "192.168.0.10"
      }
    ]
  }
}
'
{
  "metadata": {
    "id": "a64f9269-36e0-4312-b8d1-52d93d569b7b",
    "name": "my-network",
    "organizationId": "9a8c6370-4065-4d4a-9da0-7678df40cd9d",
    "projectId": "e36c058a-8eba-4f5b-91f4-f6ffb983795c",
    "creationTime": "2024-05-31T14:11:00Z",
    "createdBy": "[email protected]",
    "provisioningStatus": "provisioned",
    "healthStatus": "healthy"
  },
  "spec": {
    "dnsNameservers": [
      "8.8.8.8"
    ]
  },
  "status": {
    "regionId": "d891dbf0-0a01-4efc-ae3a-5d77f6d3424b",
    "prefix": "192.168.0.0/24"
  }
}

Authorizations

Authorization
string
header
required

Operation requires OAuth 2.0 bearer token authentication.

Body

application/json

A request for a network create.

A network request.

metadata
object
required

Metadata required for all API resource reads and writes.

spec
object
required

A network's specification. A network's specification.

Response

A layer 3 network.

A network.

metadata
object
required

Metadata required by project scoped resource reads.

spec
object
required

A network's specification.

status
object
required

Read only status about a network.