Draft the name and label a component create would store
const url = 'https://example.com/api/v1/components:renderLabel';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"location":"example","name":"example","parent":"example","product":"example","system":"example"}'};
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/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.
Request Body required
Section titled “Request Body required ”object
A URL to the JSON Schema for this object.
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.
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.
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.
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
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.
Responses
Section titled “ Responses ”OK
object
A URL to the JSON Schema for this object.
The label the create would store. Empty means no label is stored and the surface falls back to the name.
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.
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.
The label rule that produced it, resolved through the same tiers the create uses. Empty means no tier carries a rule for this classification.
Example
{ "$schema": "/api/v1/schemas/DraftLabelOutputBody.json"}default
Section titled “default ”Error
object
A URL to the JSON Schema for this object.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
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"}