Skip to content

Draft the name and label a component create would store

POST
/components:renderLabel
curl --request POST \
--url https://example.com/api/v1/components:renderLabel \
--header 'Content-Type: application/json' \
--data '{ "location": "example", "name": "example", "parent": "example", "product": "example", "system": "example" }'

Drafts the name and the label a component create would stamp, for the classification and placement a create form already holds, without creating anything. It allocates no ordinal, opens no write transaction and takes no advisory lock, which is what separates it from a preview that mints: the ordinal is READ (the lowest free number among the live siblings in the placement bucket) rather than allocated. That answer is provisional, so a form posts the NAME back as expected_name on the create and is refused (409) rather than silently renamed if another create takes the number or the type’s stem moves first. Omitting name drafts the name the platform would mint, and refuses (422) exactly where a nameless create would. Gated by component:create, the permission the create it precedes needs; the parent resolves within the caller’s component:create scope and the location ref within location:read, because the rendered string can carry that label. Naming a system additionally requires system:update and resolves within that scope, the same as the create, because the create binds that system’s membership: a preview is never served for a bind the create would refuse. Omitting parent is the parentless bucket, which a create refuses without an all-scoped grant, so the draft refuses it too (403): a form must not preview a bucket its create declines, and the previewed ordinal reports which names that bucket already holds.

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
location

The location this component will sit at, by name or uuid. Resolved within the caller’s location:read scope: a location out of scope is refused, never rendered.

string
name

The name the row will carry. Omit it to draft the name and label the platform would produce; supply it to draft the label an operator-named row would carry, which has no ordinal at all.

string
parent

The parent component, by name or uuid. Part of the placement bucket a generated name’s ordinal is read from, so a draft that omits it previews the wrong bucket. Resolved within the caller’s component:create scope, the same set the create resolves it in.

string
product
required

The product this component is an instance of, by name or uuid; the classification both a label rule and a generated name are resolved from

string
system

The system this component will belong to, by name or uuid. Naming it requires system:update, exactly as the create does, because the create inserts that system’s membership; it resolves within that scope, and system:read decides only whether the refusal may name the system.

string

OK

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
label
required

The label the create would store. Empty means no label is stored and the surface falls back to the name.

string
name
required

The name the create would stamp: the one you supplied, or the one the platform would mint. Generated names carry the ordinal that is free in the placement bucket right now.

string
ordinal

The ordinal that name was minted from, absent when you supplied the name (an operator-named row carries no ordinal). Informational: what a form posts back as the create’s precondition is the NAME above, since that carries the stem and the suppression rule as well as this number.

integer format: int64
rule
required

The label rule that produced it, resolved through the same tiers the create uses. Empty means no tier carries a rule for this classification.

string
Example
{
"$schema": "/api/v1/schemas/DraftLabelOutputBody.json"
}

Error

Media type application/problem+json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank
Example
{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}