Skip to content

set_node_group_prefixes

PUT
/api/v1/node-groups/{id}/prefixes
curl --request PUT \
--url https://example.com/api/v1/node-groups/example/prefixes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "prefixes": [ { "description": "example", "prefix": "example" } ] }'
id
required
string

Folder id

Media typeapplication/json

The folder’s hand-made ranges, in full.

⚠️ Whole list, not a diff. The three sibling sub-resources here (pool, geo, placement) are whole-value PUTs for the same reason: the editor is a dialog with a Save button, so a per-row DELETE would act the moment ✕ is clicked — before Save, and with no way back. Clearing every hand-made range is {"prefixes": []}, which is why there is no companion DELETE endpoint. (A per-row path could not carry a CIDR anyway: / and : are in the value.)

object
prefixes
required
Array<object>

One hand-made IP range on a folder.

object
description

What the range is called (“Matsuyama LAN”), or empty.

string
prefix
required

A CIDR. Host bits are allowed and canonicalised — 192.168.1.5/24 is stored as 192.168.1.0/24, because that is what a person reading a device’s config types.

string
Examplegenerated
{
"prefixes": [
{
"description": "example",
"prefix": "example"
}
]
}

The folder’s hand-made ranges were replaced

A value that is not an IP range, a duplicate, one a sync already owns, too many, or a description that is too long

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

No valid bearer token

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Role lacks ManageConfig

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

No such folder, or not one this caller may act on

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

This deployment has no write side (skeleton mode)

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}