Skip to content

Draft the name and label a location create would store

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

The location tier of :renderLabel on components. Drafts the name and the label a location create would stamp, allocating nothing. A shipped fleet answers from the global location rule, which reads the location’s own name as words and titles it, so a location named north-wing drafts as North Wing; an empty label means no rule resolves at any tier, and the surface falls back to the name. Omitting name refuses (422) a location_type with no name rule, the same refusal a nameless create gives. Gated by location:create; the parent resolves within the caller’s location:create scope, because a location’s two placement buckets are under a parent or at the root and that is where the ordinal is read from. Omitting parent is the ROOT bucket, which a create refuses without an all-scoped grant, so the draft refuses it too (403) rather than reporting which names the fleet root already holds.

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
location_type
required

The location_type this location is classified by, by name or uuid

string
name

The name the row will carry. Omit it to draft the name and label the platform would produce, which a location_type with no name rule refuses; supply it to draft the label an operator-named location would carry.

string
parent

The parent location, by name or uuid. A location has two placement buckets, under a parent or at the root, and this is which one a generated name’s ordinal is read from. Resolved within the caller’s location:create scope.

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