Skip to Content
CloudAPI and integrationsPublic M2M APIPublic M2M API — networking

Public M2M API — networking

Review the operation, its input and access requirements. Parameter names and enum values are protocol identifiers and must retain the exact spelling shown. Optional/defaulted input is marked as such; required fields nested beneath an optional object apply when that object is supplied. Only statically recognized literal constraints are shown; additional validation, conditional requirements and provider rules may apply.

Authentication and permissions · Requests, results and recovery

/api/v1/networking

Exported methods: GET, POST

GET

  • Resource scopes: networking:read
  • Query parameters: tokenId
  • Response keys observed across outcomes: data, firewallTemplates, firewalls, ips, loadBalancers, networks

POST

  • Resource scopes: networking:write
  • Explicit response statuses: 201, 422
  • Explicit error codes: invalid_request, networking_error
  • Response keys observed across outcomes: data, firewall, ip, network, template

Provide one of these observed alternatives; additional validation may apply.

Payload alternative 1

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
kindliteralNoNonetwork—
tokenIdstringYesNo—min(1)
namestringNoNo—min(1), max(120)
ipRangestringYesNo—min(7), max(32), default("10.0.0.0/16")
subnetsarrayYesNo——
subnets[].typeenumYesNocloud, server, vswitchdefault("cloud")
subnets[].ipRangestringNoNo——
subnets[].networkZonestringYesNo—default("eu-central")
labelsobjectYesNo——

Payload alternative 2

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
kindliteralNoNofirewall—
providerenumYesNohetzner, cloudflaredefault("hetzner")
tokenIdstringYesNo——
zoneIdstringYesNo——
namestringNoNo—min(1), max(120)
rulesarrayYesNo——
rules[].directionenumNoNoin, out, inbound, outbound—
rules[].protocolenumNoNotcp, udp, icmp, esp, gre, any—
rules[].portstringYesNo——
rules[].sourceIpsarrayYesNo——
rules[].destinationIpsarrayYesNo——
rules[].actionenumYesNoallow, deny, block, challengedefault("allow")
rules[].descriptionstringYesNo——

Payload alternative 3

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
kindliteralNoNofirewall_template—
namestringNoNo—min(1), max(120)
descriptionstringYesNo—max(500)
providerstringYesNo—default("custom")
rulesarrayYesNo——
tagsarrayYesNo——

Payload alternative 4

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
kindliteralNoNoip—
tokenIdstringYesNo—min(1)
typeenumYesNofloating, primarydefault("floating")
familyenumYesNoipv4, ipv6default("ipv4")
namestringNoNo—min(1), max(120)
locationstringYesNo—min(1), default("fsn1")
descriptionstringYesNo——

/api/v1/networking/firewalls

Exported methods: GET, POST

GET

  • Resource scopes: networking:read
  • Additional permissions: view:firewalls
  • Query parameters: provider, tokenId, zoneId
  • Explicit response statuses: 400
  • Response keys observed across outcomes: error

Request and permission details below also include the matching forwarded handler.

POST

  • Resource scopes: networking:write
  • Additional permissions: manage:firewalls
  • Query parameters: provider, tokenId, zoneId
  • Explicit response statuses: 201, 400
  • Response keys observed across outcomes: error

Request and permission details below also include the matching forwarded handler.

Validated request fields

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
labelsobjectYesNo——
namestringNoNo—min(1), max(255)
rulesarrayYesNo——
rules[].descriptionstringYesNo——
rules[].destination_ipsarrayYesNo——
rules[].destinationIpsarrayYesNo——
rules[].directionenumNoNoin, out—
rules[].portstringYesNo——
rules[].protocolstringNoNo—min(1)
rules[].source_ipsarrayYesNo——
rules[].sourceIpsarrayYesNo——

/api/v1/networking/firewalls/{id}

Exported methods: GET, PATCH, DELETE

GET

  • Resource scopes: networking:read
  • Path parameters: id
  • Query parameters: ipBlock, ipOnFirewall, provider, tokenId, zoneId
  • Explicit response statuses: 404
  • Explicit error codes: not_found
  • Response keys observed across outcomes: firewall, kind

PATCH

  • Resource scopes: networking:write
  • Path parameters: id
  • Explicit response statuses: 404, 422, 502
  • Explicit error codes: invalid_request, not_found, upstream_error
  • Response keys observed across outcomes: firewall, kind

Validated request fields

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
descriptionstringYesYes—max(500)
ipBlockstringYesNo——
ipOnFirewallstringYesNo——
kindenumYesNofirewall, template—
namestringYesNo—min(1), max(128)
providerenumYesNohetzner, cloudflare, ovhdefault("hetzner")
rulesarrayYesNo——
rules[].actionenumYesNoallow, deny, block, challengedefault("allow")
rules[].descriptionstringYesYes——
rules[].destinationIpsarrayYesNo——
rules[].directionenumNoNoin, out, inbound, outbound—
rules[].enabledbooleanYesNo—default(true)
rules[].idstringYesNo——
rules[].portstringYesYes——
rules[].prioritynumberYesNo——
rules[].protocolenumNoNotcp, udp, icmp, esp, gre, any—
rules[].sourceIpsarrayYesNo——
tagsarrayYesNo——
tokenIdstringYesNo—min(1)
zoneIdstringYesNo—min(1)

DELETE

  • Resource scopes: networking:write
  • Path parameters: id
  • Query parameters: ipBlock, ipOnFirewall, provider, tokenId, zoneId
  • Explicit response statuses: 404, 502
  • Explicit error codes: not_found, upstream_error
  • Response keys observed across outcomes: deleted, id, kind

Request input was not extracted for this operation; consult its specific contract before sending. Do not infer that no body is required.

/api/v1/networking/firewalls/templates

Exported methods: GET, POST

GET

  • Resource scopes: networking:read
  • Additional permissions: view:firewalls
  • Explicit response statuses: 401, 500
  • Response keys observed across outcomes: error

Request and permission details below also include the matching forwarded handler.

POST

  • Resource scopes: networking:write
  • Additional permissions: manage:firewalls
  • Explicit response statuses: 201, 401, 500
  • Response keys observed across outcomes: error

Request and permission details below also include the matching forwarded handler.

Validated request fields

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
descriptionstringYesNo—max(1000)
namestringNoNo—min(1), max(255)
providerstringYesNo——
rulesarrayNoNo——
tagsarrayYesNo——

/api/v1/networking/floating-ips/{id}

Exported methods: GET, PATCH, DELETE

GET

  • Resource scopes: networking:read
  • Path parameters: id
  • Query parameters: tokenId, type
  • Explicit response statuses: 404
  • Explicit error codes: not_found
  • Response keys observed across outcomes: floatingIp, kind, tokenId

PATCH

  • Resource scopes: networking:write
  • Path parameters: id
  • Explicit response statuses: 404, 422, 502
  • Explicit error codes: invalid_request, not_found, upstream_error
  • Response keys observed across outcomes: floatingIp, kind

Validated request fields

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
actionenumYesNoassign, unassign, set_ptr—
dnsPtrstringYesYes——
ipstringYesNo——
namestringYesNo—min(1), max(64)
serverIdnumberYesNo—int(), positive()
tokenIdstringYesNo—min(1)
typeenumYesNofloating, primarydefault("floating")

DELETE

  • Resource scopes: networking:write
  • Path parameters: id
  • Query parameters: tokenId, type
  • Explicit response statuses: 404, 502
  • Explicit error codes: not_found, upstream_error
  • Response keys observed across outcomes: deleted, id, status

Request input was not extracted for this operation; consult its specific contract before sending. Do not infer that no body is required.

/api/v1/networking/ips

Exported methods: GET, POST

GET

  • Resource scopes: networking:read
  • Additional permissions: view:ips
  • Query parameters: tokenId, type
  • Explicit response statuses: 400, 401, 500
  • Response keys observed across outcomes: error

Request and permission details below also include the matching forwarded handler.

POST

  • Resource scopes: networking:write
  • Additional permissions: manage:ips
  • Query parameters: tokenId
  • Explicit response statuses: 201, 400, 401, 422, 500
  • Response keys observed across outcomes: error

Request and permission details below also include the matching forwarded handler.

Validated request fields

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
descriptionstringYesNo—max(255)
familyenumNoNoipv4, ipv6—
labelsobjectYesNo——
locationstringYesNo——
namestringYesNo—max(255)
serverIdnumberYesNo—int(), positive()
typeenumNoNofloating, primary—

/api/v1/networking/load-balancers

Exported methods: GET, POST

GET

  • Resource scopes: networking:read
  • Additional permissions: view:load_balancers
  • Query parameters: provider, tokenId, zoneId
  • Explicit response statuses: 400, 401, 500
  • Response keys observed across outcomes: error

Request and permission details below also include the matching forwarded handler.

POST

  • Resource scopes: networking:write
  • Additional permissions: manage:load_balancers
  • Query parameters: provider, tokenId, zoneId
  • Explicit response statuses: 201, 400, 401, 500
  • Response keys observed across outcomes: error

Request and permission details below also include the matching forwarded handler.

Validated request fields

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
algorithmstringYesNo——
labelsobjectYesNo——
locationstringYesNo——
namestringNoNo—min(1), max(255)
servicesarrayYesNo——
targetsarrayYesNo——

/api/v1/networking/load-balancers/{id}

Exported methods: GET, PATCH, DELETE

GET

  • Resource scopes: networking:read
  • Path parameters: id
  • Query parameters: provider, tokenId, zoneId
  • Explicit response statuses: 404
  • Explicit error codes: not_found
  • Response keys observed across outcomes: kind, loadBalancer

PATCH

  • Resource scopes: networking:write
  • Path parameters: id
  • Explicit response statuses: 404, 422, 502
  • Explicit error codes: invalid_request, not_found, upstream_error
  • Response keys observed across outcomes: kind, loadBalancer

Validated request fields

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
addTargetobjectYesNo——
addTarget.ipstringYesNo——
addTarget.labelSelectorstringYesNo——
addTarget.serverIdnumberYesNo—int()
addTarget.typeenumNoNoserver, ip, label_selector—
addTarget.usePrivateIpbooleanYesNo——
algorithmenumYesNoround_robin, least_connections—
deleteProtectionbooleanYesNo——
loadBalancerTypestringYesNo—min(1)
namestringYesNo—min(1), max(128)
providerenumYesNohetzner, cloudflaredefault("hetzner")
removeTargetobjectYesNo——
removeTarget.ipstringYesNo——
removeTarget.labelSelectorstringYesNo——
removeTarget.serverIdnumberYesNo—int()
removeTarget.typeenumNoNoserver, ip, label_selector—
tokenIdstringYesNo—min(1)
zoneIdstringYesNo—min(1)

DELETE

  • Resource scopes: networking:write
  • Path parameters: id
  • Query parameters: provider, tokenId, zoneId
  • Explicit response statuses: 404, 502
  • Explicit error codes: not_found, upstream_error
  • Response keys observed across outcomes: deleted, id, status

Request input was not extracted for this operation; consult its specific contract before sending. Do not infer that no body is required.

/api/v1/networking/networks

Exported methods: GET, POST

GET

  • Resource scopes: networking:read
  • Additional permissions: view:networks
  • Query parameters: tokenId
  • Explicit response statuses: 400, 401, 422, 500
  • Response keys observed across outcomes: error

Request and permission details below also include the matching forwarded handler.

POST

  • Resource scopes: networking:write
  • Additional permissions: manage:networks
  • Query parameters: tokenId
  • Explicit response statuses: 201, 400, 401, 422, 500
  • Response keys observed across outcomes: error

Request and permission details below also include the matching forwarded handler.

Validated request fields

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
ipRangestringNoNo—min(1)
labelsobjectYesNo——
namestringNoNo—min(1), max(255)

/api/v1/networking/overview

Exported methods: GET

GET

  • Resource scopes: networking:read
  • Additional permissions: view:networking
  • Explicit response statuses: 401, 500
  • Response keys observed across outcomes: error

Request and permission details below also include the matching forwarded handler.