POST /networks
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.
Servers
- https://api.hetzner.cloud/v1
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
name |
String | Yes |
Name of the Network. |
expose_routes_to_vswitch |
Boolean | No |
Toggle to expose routes to the Networks vSwitch. Indicates if the routes from this Network should be exposed to the vSwitch in this Network. Only takes effect if a vSwitch is setup in this Network. |
labels |
Object | No |
User-defined labels ( |
routes[] |
Array | No |
Array of routes set in this Network. |
routes[].gateway |
String | Yes |
Gateway of the route. Packages addressed for the specified destination will be send to this IP address. Cannot be
|
routes[].destination |
String | Yes |
Destination network or host of the route. Packages addressed for IPs matching the destination IP prefix will be send to the specified gateway. Must be one of
Must not overlap with
|
subnets[] |
Array | No |
Array of subnets to allocate. |
subnets[].type |
String | Yes |
Type of subnet.
Possible values:
|
subnets[].network_zone |
String | Yes |
Name of the Network Zone. The Location contains the |
subnets[].vswitch_id |
Integer | No |
ID of the robot vSwitch. Must only be supplied for subnets of type |
subnets[].ip_range |
String | No |
IP range of the subnet. Uses CIDR notation. Must be a subnet of the parent Networks Must not overlap with any other subnets or with any destinations in routes. Minimum network size is /30. We highly recommend that you pick a larger subnet with a /24 netmask. |
ip_range |
String | Yes |
IP range of the Network. Uses CIDR notation. Must span all included subnets. Must be one of the private IPv4 ranges of RFC1918. Minimum network size is /24. We highly recommend that you pick a larger Network with a /16 netmask. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.