POST /servers/{id}/actions/attach_to_network
Attaches a Server to a network. This will complement the fixed public Server interface by adding an additional ethernet interface to the Server which is connected to the specified network.
The Server will get an IP auto assigned from a subnet of type server
in the same network_zone
.
Using the alias_ips
attribute you can also define one or more additional IPs to the Servers. Please note that you will have to configure these IPs by hand on your Server since only the primary IP will be given out by DHCP.
Call specific error codes
Code | Description |
---|---|
server_already_attached | The server is already attached to the network |
ip_not_available | The provided Network IP is not available |
no_subnet_available | No Subnet or IP is available for the Server within the network |
networks_overlap | The network IP range overlaps with one of the server networks |
Servers
- https://api.hetzner.cloud/v1
Path parameters
Name | Type | Required | Description |
---|---|---|---|
id |
Integer | Yes |
ID of the Server. |
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 |
---|---|---|---|
alias_ips[] |
Array | No |
Additional IPs to be assigned to this Server |
network |
Integer | Yes |
ID of an existing network to attach the Server to |
ip |
String | No |
IP to request to be assigned to this Server; if you do not provide this then you will be auto assigned an IP address |
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.