Skip to main content

RenameClass

Rename one exact node or customer connection category. Requires objects.update permission. Supply new_class in addition to the selector.

An exact node target is its type and class, for example {"target":"image","class":"Photos"}.

An exact customer connection target uses an endpoint-type object plus all three class names:

{
"target": {"src_type": "entity", "dst_type": "image"},
"class": "AppearsIn",
"src_class": "People",
"dst_class": "Photos"
}

Node targets reject endpoint class fields. Exact connection targets require both endpoint types and classes. Class names are nonempty, cannot begin with _, and are matched without case sensitivity. Index selectors additionally include property and kind. GetIndexes permits partial selectors; other metadata commands require an exact category.

The new name must not collide with another category of the same type or connection endpoint pair. Renaming preserves identities, properties, connections, ownership and indexes. Display names and schema cache entries follow the executing transaction; pinned older readers retain their original names.

[{"RenameClass":{"target":"image","class":"Photos","new_class":"Pictures"}}]

Success returns status: 0. Invalid selectors and name collisions fail the transaction.