Networks
Create a Network
Creates a Network.
The provided ip_range can only be extended later on, but not reduced.
Subnets can be added now or later on using the add subnet action. If you do not specify an ip_range for the subnet the first available /24 range will be used.
Routes can be added now or later by using the add route action.
post/networks
Request
- Base URL: https://api.hetzner.cloud/v1
- URL: https://api.hetzner.cloud/v1/networks
- Auth: HTTP bearer
Request body
Example request
{
"name": "mynet",
"ip_range": "10.0.0.0/16",
"labels": {
"environment": "prod",
"example.com/my": "label",
"just-a-key": ""
},
"subnets": [
{
"ip_range": "10.0.1.0/24",
"network_zone": "eu-central",
"vswitch_id": 1000
}
],
"routes": [
{
"destination": "10.100.1.0/24",
"gateway": "10.0.1.1"
}
]
}Response
Request succeeded.
Example response
{
"network": {
"id": 4711,
"name": "mynet",
"ip_range": "10.0.0.0/16",
"subnets": [
{
"ip_range": "10.0.1.0/24",
"network_zone": "eu-central",
"gateway": "10.0.0.1",
"vswitch_id": 1000
}
],
"routes": [
{
"destination": "10.100.1.0/24",
"gateway": "10.0.1.1"
}
],
"servers": [
42
],
"load_balancers": [
42
],
"labels": {
"environment": "prod",
"example.com/my": "label",
"just-a-key": ""
},
"created": "2016-01-30T23:55:00Z"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.