Network Actions

Delete a subnet from a Network

Deletes a single subnet entry from a Network.

Subnets containing attached resources can not be deleted, they must be detached beforehand.

If a change is currently being performed on this Network, a error response with code conflict will be returned.

post/networks/{id}/actions/delete_subnet

Request

  • Base URL: https://api.hetzner.cloud/v1
  • URL: https://api.hetzner.cloud/v1/networks/{id}/actions/delete_subnet
  • Auth: HTTP bearer

Path parameters

idinteger required

ID of the Network.

Example:42

ID of the Network.

Request body

ip_rangestring required

IP range in CIDR block notation of the subnet to delete.

Example request

{
  "ip_range": "10.0.1.0/24"
}

Response

Request succeeded.

Example response

{
  "action": {
    "id": 42,
    "command": "start_resource",
    "started": "2016-01-30T23:55:00Z",
    "finished": "2016-01-30T23:55:00Z",
    "progress": 100,
    "resources": [
      {
        "id": 42,
        "type": "server"
      }
    ],
    "error": {
      "code": "action_failed",
      "message": "Action failed"
    }
  }
}

Changes

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