Skip to content

Start a whole system from a template

POST
/systems:createFromTemplate
curl --request POST \
--url https://example.com/api/v1/systems:createFromTemplate \
--header 'Content-Type: application/json' \
--data '{ "attach": { "additionalProperty": [ { "additionalProperty": "example" } ] }, "label": "example", "location": "example", "name": "example", "outpost": "example", "standard": "example", "template": "mr55-system" }'

Creates a system from a system template at a location, built to the standard you name or the template’s own (yours of that name when you hold one, else created from its standard template, with any parent it hangs off, in the same write), with a component for each slot filled to its quorum and assigned, and the declared values. A component whose slot you give an address in attach lands attached; the rest land unattached and are listed in to_attach. One transaction: it lands whole or not at all, every piece in your own scope with its own audit row carrying from_template. Gated by system:create, and also needs system:read, system:update, component:create and component:update; endpoint:create when anything attaches, standard:create when a standard is created from its template. A location outside your location scope is a 404, an unknown template or standard a 404, a standard the template cannot staff a 422 naming the slots.

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
attach

Driver inputs per slot, one object per component of the slot in order; an object with an address (host) attaches that component, the rest land unattached

object
key
additional properties
Array<object> | null
object
key
additional properties
string
label

The system’s label

string
location

The location the system and its components sit in, by name or dotted path

string
name

The system’s name; minted from its type when empty

string
outpost

The outpost the endpoints are placed on; needed when any component attaches

string
standard

A standard of your own to build to, by name; omitted takes the template’s, created from its template in the same write when you hold none of that name

string
template
required

The system template, by name

string
>= 1 characters

Created

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
components
required

A component per slot, filled to quorum and assigned

Array<object> | null
object
attached
required

Whether its endpoint attached from the inputs given; false lists it as still to attach

boolean
component
required

The component’s name

string
component_id
required

The component’s id, the stable address a link to it uses

string
product
required

Its product

string
slot

The slot it fills in its system

string
standard
required

The standard it is built to

string
standards_created
required

The standards this write created from their templates (parents first); empty when you held them

Array<string> | null
system
required

The system’s name

string
system_id
required

The system’s id, the stable address a link to it uses

string
template
required

The template it came from; recorded in the audit detail only

string
to_attach
required

The components that landed with no endpoint, still to attach

Array<string> | null

Example

{
"$schema": "/api/v1/schemas/CreateSystemFromTemplateOutputBody.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"
}