Skip to content

Start a component from a template

POST
/components:createFromTemplate
curl --request POST \
--url https://example.com/api/v1/components:createFromTemplate \
--header 'Content-Type: application/json' \
--data '{ "inputs": { "additionalProperty": "example" }, "label": "example", "location": "example", "name": "example", "outpost": "example", "template": "kestrel-vroom" }'

Creates one component from a component template at a location: its product and the template’s declared values, and, when the inputs carry an address (host), its endpoint attached through the driver with the template’s preset under your inputs. A secret input names a secret you may bind (secret:bind), resolved as an attach resolves it. One transaction, every piece in your own scope with its own audit row carrying from_template; nothing points back at the template. Gated by component:create; declared values also need component:update and an attach endpoint:create. A location outside your location scope is a 404, an unknown template a 404, inputs with no address or an attach with no outpost a 422.

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
inputs

Driver inputs laid over the template’s preset: the address (host) attaches the endpoint, a secret input names a secret you may bind (secret:bind)

object
key
additional properties
string
label

The component’s label

string
location

The location the component sits in, by name or dotted path

string
name

The component’s name; minted as an unnamed create mints it when empty

string
outpost

The outpost the endpoint is placed on; needed when inputs carry an address

string
template
required

The component 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
attached
required

Whether its endpoint attached from the inputs given; false means it is 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
template
required

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

string

Example

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