Skip to content

Edit network (legacy)

Deprecated
PUT
/v1/networks/{networkID}

Edit an existing IPv4-only network.

Deprecated: Use PUT /v2/networks/{networkID} instead.

Token scope required: networks:update

Caution: Any properties not provided in the request will be reset to their default values.

networkID
required
string
Example
network-ZJOW3QUQUX5ZAVPVYRHDQUAEIY
object
name
required

Name of the network

string
>= 1 characters <= 255 characters
Example
Management
description

Optional description of the network

string
<= 255 characters
Example
This network allows the ops team to manage infrastructure
lighthousesAsRelays

Should the lighthouses in this network be configured as relays?

This applies to the managed lighthouse as well as to any lighthouse you run yourself. When enabled on a network using the managed lighthouse, traffic between hosts that cannot connect directly may be relayed through Defined Networking’s infrastructure. Relayed traffic remains encrypted end-to-end between the two hosts.

boolean

Successful operation

object
data
required
object
id
required
string
cidr
required
string format: ipv4/cidr
organizationID
required
string
signingCAID
required

The ID of the Certificate Authority being used.

string
createdAt
required
string format: date-time
name
required
string
default: Network1
description
required
string
hostCount
required
integer
lighthousesAsRelays
required
boolean
curve
required

Cryptographic curve used by the network’s certificates. Known values are 25519 and P256. New values may be added, so clients should accept values not listed here.

string
Example
{
"data": {
"id": "network-KAOWMXZHZWCVMGGFKM22XEGYLE",
"createdAt": "2023-02-14T20:34:59Z",
"organizationID": "org-F63A24JGCLJV3ZEUTLCBISGETA",
"signingCAID": "ca-TRJSVAAAPJXTOICJMG2KZBKQEE",
"name": "Management",
"description": "This network allows the ops team to manage infrastructure",
"cidr": "192.168.4.0/22",
"hostCount": 27,
"lighthousesAsRelays": false,
"curve": "25519"
}
}

Validation error

object
errors
required
Array<object>
object
code
required

A static name for the error type

string
message
required

A short human readable description of the error

string
path

Describes the variable missing or malformed

string
param

The query parameter the error relates to, such as filter.targetType

string
extra

Machine-readable details about the error. ERR_LIMIT_EXCEEDED errors carry limit and limitName.

object
limit

The maximum number of resources allowed

integer
limitName

The kind of resource the limit applies to

string
key
additional properties
any
Examples

A network already exists with the name.

{
"errors": [
{
"code": "ERR_DUPLICATE_VALUE",
"message": "value already exists",
"path": "name"
}
]
}

The API key is missing, invalid or expired.

object
errors
required
Array<object>
object
code
required

A static name for the error type

string
message
required

A short human readable description of the error

string
path

Describes the variable missing or malformed

string
param

The query parameter the error relates to, such as filter.targetType

string
extra

Machine-readable details about the error. ERR_LIMIT_EXCEEDED errors carry limit and limitName.

object
limit

The maximum number of resources allowed

integer
limitName

The kind of resource the limit applies to

string
key
additional properties
any
Example
{
"errors": [
{
"code": "ERR_UNAUTHORIZED",
"message": "unauthorized"
}
]
}

The API key lacks a required scope.

object
errors
required
Array<object>
object
code
required

A static name for the error type

string
message
required

A short human readable description of the error

string
path

Describes the variable missing or malformed

string
param

The query parameter the error relates to, such as filter.targetType

string
extra

Machine-readable details about the error. ERR_LIMIT_EXCEEDED errors carry limit and limitName.

object
limit

The maximum number of resources allowed

integer
limitName

The kind of resource the limit applies to

string
key
additional properties
any
Examples

The API key lacks a required scope.

{
"errors": [
{
"code": "ERR_FORBIDDEN",
"message": "api key must support the following scopes: hosts:read"
}
]
}

Network not found

object
errors
required
Array<object>
object
code
required

A static name for the error type

string
message
required

A short human readable description of the error

string
path

Describes the variable missing or malformed

string
param

The query parameter the error relates to, such as filter.targetType

string
extra

Machine-readable details about the error. ERR_LIMIT_EXCEEDED errors carry limit and limitName.

object
limit

The maximum number of resources allowed

integer
limitName

The kind of resource the limit applies to

string
key
additional properties
any
Example
{
"errors": [
{
"code": "ERR_NOT_FOUND",
"message": "resource not found"
}
]
}

The organization has exceeded its API request rate limit. Retry the request after a short delay.

object
errors
required
Array<object>
object
code
required

A static name for the error type

string
message
required

A short human readable description of the error

string
path

Describes the variable missing or malformed

string
param

The query parameter the error relates to, such as filter.targetType

string
extra

Machine-readable details about the error. ERR_LIMIT_EXCEEDED errors carry limit and limitName.

object
limit

The maximum number of resources allowed

integer
limitName

The kind of resource the limit applies to

string
key
additional properties
any
Example
{
"errors": [
{
"code": "ERR_TOO_MANY_REQUESTS",
"message": "too many requests"
}
]
}