Arrange one folder's **direct** children in name order, writing the tree's stored `sort_order`.
const url = 'https://example.com/api/v1/node-groups/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/sort';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"direction":"asc"}'};
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/node-groups/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/sort \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "direction": "asc" }'Subfolders and member nodes are renumbered as one list (ADR-162): under a parent they are siblings, so A→Z means A→Z over everything in the folder and a subfolder can land between two nodes. Folders deeper down are untouched: the operator right-clicked one folder.
🚨 This replaces an order somebody arranged by hand, and nothing keeps the old one. That is the decision (ADR-130 decision 5) rather than an oversight — the command is reached by right-clicking the folder it acts on, which is the same consent a file manager asks for.
⚠️ Not a bulk placement. Doing this by calling PUT /node-groups/{id}/placement once per
child would be a partial write with nothing to read back when it fails halfway. One request,
one transaction — the same shape POST /nodes/move takes for a multi-node drag, which places
the whole batch in a single statement rather than calling the single-node writer N times.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Group id
Request Bodyrequired
Section titled “Request Bodyrequired”Which way to order this folder’s children (ADR-130).
object
asc = A → Z, desc = Z → A. Required: there is no sensible default for a command whose
whole content is the direction, and a missing field would silently pick one.
Responses
Section titled “Responses”The folder’s direct children were renumbered in name order
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" }}No such group
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 core 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" }}