Skip to main content
PATCH
Python

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234_abcdef

Path Parameters

project_id
integer
required

Project ID

Example:

1

region_id
integer
required

Region ID

Example:

1

subnet_id
string<uuid4>
required

Subnet ID

Example:

"b39792c3-3160-4356-912e-ba396c95cdcf"

Body

application/json
dns_nameservers
string<ipvanyaddress>[] | null

List IP addresses of DNS servers to advertise via DHCP.

Example:
enable_dhcp
boolean

True if DHCP should be enabled

Example:

true

gateway_ip
string<ipvanyaddress> | null

Default GW IPv4 address to advertise in DHCP routes in this subnet. Omit this field to let the cloud backend allocate it automatically. Set to null if no gateway must be advertised by this subnet's DHCP (useful when attaching instances to multiple subnets in order to prevent default route conflicts).

Example:

"192.168.10.1"

host_routes
RouteInSerializer · object[] | null

List of custom static routes to advertise via DHCP.

Example:
name
string | null

Name

Pattern: ^[a-zA-Z0-9][a-zA-Z 0-9._\-]{1,61}[a-zA-Z0-9._]$
Example:

"some_name"

tags
UpdateTagsSerializer · object | null

Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide key-value pairs to add or update tags. Set tag values to null to remove tags. Unspecified tags remain unchanged. Read-only tags are always preserved and cannot be modified.

Examples:

  • Add/update tags: {'tags': {'environment': 'production', 'team': 'backend'}} adds new tags or updates existing ones.
  • Delete tags: {'tags': {'old_tag': null}} removes specific tags.
  • Remove all tags: {'tags': null} removes all user-managed tags (read-only tags are preserved).
  • Partial update: {'tags': {'environment': 'staging'}} only updates specified tags.
  • Mixed operations: {'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}} adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag', preserving other existing tags.
  • Replace all: first delete existing tags with null values, then add new ones in the same request.
Example:

Response

200 - application/json

Subnet

available_ips
integer | null
required

Number of available ips in subnet. Null when this data isn't available.

Example:

250

cidr
string<ipvanynetwork>
required

CIDR

Example:

"192.168.13.0/24"

created_at
string<date-time>
required

Datetime when the subnet was created

Example:

"2019-06-13T13:58:12+0000"

creator_task_id
string<uuid4> | null
required

Task that created this entity. Null when the subnet wasn't created via a tracked task.

Example:

"5cc890da-d031-4a23-ac31-625edfa22812"

dns_nameservers
string<ipvanyaddress>[]
required

List IP addresses of a DNS resolver reachable from the network

Example:
enable_dhcp
boolean
required

True if DHCP should be enabled

Example:

true

gateway_ip
string<ipvanyaddress> | null
required

Default GW IPv4 address, advertised in DHCP routes of this subnet. If null, no gateway is advertised by this subnet.

Example:

"192.168.13.1"

has_router
boolean
required
deprecated
read-only

Deprecated. Always returns false.

Example:

false

host_routes
RouteOutSerializer · object[]
required

List of custom static routes to advertise via DHCP.

Example:
id
string<uuid4>
required

Subnet id.

Example:

"b39792c3-3160-4356-912e-ba396c95cdcf"

ip_version
enum<integer>
required

IP version

Available options:
4,
6
Example:

4

name
string
required

Subnet name

Pattern: ^[a-zA-Z0-9][a-zA-Z 0-9._\-]{1,61}[a-zA-Z0-9._]$
Example:

"subnet_3"

network_id
string<uuid4>
required

Network ID

Example:

"b30d0de7-bca2-4c83-9c57-9e645bd2cc92"

project_id
integer
required

Project ID

Example:

1337

region
string
required

Region name

Example:

"Luxembourg 1"

region_id
integer
required

Region ID

Example:

7

tags
TagSerializer · object[]
required

List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.

Example:
task_id
string<uuid4> | null
required

The UUID of the active task that currently holds a lock on the resource. This lock prevents concurrent modifications to ensure consistency. If null, the resource is not locked.

Example:

null

total_ips
integer | null
required

Total number of ips in subnet. Null when this data isn't available.

Example:

253

updated_at
string<date-time>
required

Datetime when the subnet was last updated

Example:

"2019-06-13T13:58:12+0000"