Edit Network
PUThttps://api.defined.net/v1/networks/:networkID
Edit an existing network.
Token scope required: networks:update
caution
Any properties not provided in the request will be reset to their default values.
Request
Path Parameters
networkID stringrequired
Example: network-ZJOW3QUQUX5ZAVPVYRHDQUAEIY
- application/json
Bodyrequired
namestringrequired
Name of the network
Possible values: non-empty
and <= 50 characters
Example:
Management
descriptionstring
Optional description of the network
Example:
This network allows the ops team to manage infrastructure
lighthousesAsRelaysboolean
Should the lighthouses in this network be configured as relays?
Example:
false
Responses
- 200
- 400
Successful operation
- application/json
- Schema
- Example (auto)
Schema
data object
metadataobject
{
"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
- application/json
- Schema
- Example (auto)
- existingNetworkName
Schema
errors object[]
{
"errors": [
{
"code": "string",
"message": "string",
"path": "string"
}
]
}
A network already exists with the name.
{
"errors": [
{
"code": "ERR_DUPLICATE_VALUE",
"message": "value already exists",
"path": "name"
}
]
}
Authorization: http
name: ApiTokentype: httpdescription: Get an api key from https://admin.defined.net/settings/api-keys with the permission scopes required. scheme: bearerbearerFormat: dnkey
- curl
- python
- go
- nodejs
- CURL
curl -L -X PUT 'https://api.defined.net/v1/networks/:networkID' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"name": "Management",
"description": "This network allows the ops team to manage infrastructure",
"lighthousesAsRelays": false
}'
ResponseClear