コンテンツにスキップ

Rename a tag on every node, folder, refusal, routing rule and grouping exception at once (ADR-263). Renaming onto a tag that already exists merges the two.

POST
/api/v1/node-tags/rename
curl --request POST \
--url https://example.com/api/v1/node-tags/rename \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "from": "example", "to": "example" }'
Media typeapplication/json

Rename one tag everywhere it is named.

object
from
required

The tag as it is stored now, case included. Not length-checked, so an old label the current rules would refuse can still be renamed away.

string
to
required

The new name. When a row already carries it, the two become one.

string
Examplegenerated
{
"from": "example",
"to": "example"
}

Renamed; how many rows changed in each place

Media typeapplication/json

What a tag rename or delete changed, per place (ADR-263). All zero means the tag was named nowhere, which is not an error.

object
exceptions
required

Grouping exceptions whose tags changed.

integer format: int64
folder_refusals
required

Folders whose refusals changed.

integer format: int64
folders
required

Folders whose labels changed.

integer format: int64
node_refusals
required

Nodes whose refusals changed.

integer format: int64
nodes
required

Nodes whose own labels changed.

integer format: int64
registered
required

Registered names changed: 1 when the tag was registered (ADR-263 Inc.2), else 0.

integer format: int64
rules
required

Routing rules whose tags changed.

integer format: int64
Examplegenerated
{
"exceptions": 1,
"folder_refusals": 1,
"folders": 1,
"node_refusals": 1,
"nodes": 1,
"registered": 1,
"rules": 1
}

from is empty, to is not a valid tag, or the two are the same

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 ManageSystem

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