preview_move_by_subtree
const url = 'https://example.com/api/v1/nodes/move-preview/subtree';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"group_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Which folder a subtree proposal covers.
object
The folder whose subtree to examine. null examines the whole inventory the caller may
see, ungrouped nodes included.
Examplegenerated
{ "group_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”Which folder’s IP range contains the address of each node in the subtree (or the whole inventory)
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
At most 200.
One node claimed equally well by two or more folders. Never moved automatically.
object
Whether any folder this caller can see carries a range at all.
Nodes already in the folder their range names, or beneath it. Counted, not listed.
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.
One node, and the single folder whose IP range contains its address.
object
The range that matched — shown so the operator can see why this folder is proposed.
Every node that would move, including those past the first 1,000.
Name and address of every node the three lists above name.
A node named in a subtree proposal, so the dialog can show it without the tree having loaded it.
object
At most 200.
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
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}No valid bearer token
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Role lacks ManageConfig
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}The folder is not one this caller may see
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}This deployment has no write side (skeleton mode)
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}