Skip to content

preview_move_by_subtree

POST
/api/v1/nodes/move-preview/subtree
curl --request POST \
--url https://example.com/api/v1/nodes/move-preview/subtree \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "group_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'
Media typeapplication/json

Which folder a subtree proposal covers.

object
group_id

The folder whose subtree to examine. null examines the whole inventory the caller may see, ungrouped nodes included.

string | null format: uuid
Examplegenerated
{
"group_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Which folder’s IP range contains the address of each node in the subtree (or the whole inventory)

Media typeapplication/json

What the IP-range match proposes for a whole subtree. A proposal, not an action, like [MovePreviewResult], and applied through the same POST /api/v1/nodes/move-by-prefix.

object
ambiguous
required

At most 200.

Array<object>

One node claimed equally well by two or more folders. Never moved automatically.

object
group_ids
required
Array<string>
node_id
required
string format: uuid
ambiguous_total
required
integer
any_prefixes
required

Whether any folder this caller can see carries a range at all.

boolean
in_place_total
required

Nodes already in the folder their range names, or beneath it. Counted, not listed.

integer
matched
required

At most 1,000 proposals — what one move-by-prefix request may carry. Apply them and ask again: the moved nodes are then in place, so the next slice comes back.

Array<object>

One node, and the single folder whose IP range contains its address.

object
group_id
required
string format: uuid
node_id
required
string format: uuid
prefix
required

The range that matched — shown so the operator can see why this folder is proposed.

string
matched_total
required

Every node that would move, including those past the first 1,000.

integer
nodes
required

Name and address of every node the three lists above name.

Array<object>

A node named in a subtree proposal, so the dialog can show it without the tree having loaded it.

object
address
required
string
name
required
string
node_id
required
string format: uuid
unmatched
required

At most 200.

Array<string>
unmatched_total
required
integer
Examplegenerated
{
"ambiguous": [
{
"group_ids": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"node_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
],
"ambiguous_total": 1,
"any_prefixes": true,
"in_place_total": 1,
"matched": [
{
"group_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"node_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"prefix": "example"
}
],
"matched_total": 1,
"nodes": [
{
"address": "example",
"name": "example",
"node_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
],
"unmatched": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
],
"unmatched_total": 1
}

The folder does not exist (invalid_group) — answered to a caller who may see every folder

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"
}
}

The folder is not one this caller may see

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"
}
}