Skip to content

Add a simulated system

POST
/nodes/{name}/simulation/systems
curl --request POST \
--url https://example.com/api/v1/nodes/example/simulation/systems \
--header 'Content-Type: application/json' \
--data '{ "location": "example", "name": "example", "standard": "example", "system_type": "example" }'

Creates a system built to a standard, with a simulated component for each staffed role in the standard’s plan (see plan-simulation-system), each at its own free address in the simulated block with its endpoint placed on the node, and assigned its role, all in one transaction: it lands whole or not at all. Component names are minted as an unnamed create mints them; roles nothing simulated fits are left short and listed. The simulator serves the components from its next pull. Gated by simulation:update, and also needs system:create, system:update, system:read, component:create, endpoint:create and node:read (and location:read when it names a place), each in the caller’s own scope; the components are created without a parent, so component:create must be all-scope. A refused piece is mapped as its own route maps it (a component refused is a 403). A node with no simulator connected is a 409, and a standard nothing simulated can staff a 422.

name
required

The node whose simulator serves the system’s components

string

The node whose simulator serves the system’s components

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
location

Where the system and its components sit, by name or dotted path

string
name

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

string
standard
required

The standard the system is built to; its roles decide the components

string
>= 1 characters
system_type
required

The system’s type, which also mints its name when none is given

string
>= 1 characters

Created

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
components
required
Array<object> | null
object
address
required

The loopback address the simulated component answers on.

string
component
required
string
product
required
string
role
required
string
node
required
string
system
required
string
system_id
required

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

string
unstaffed
required

The roles nothing simulated could fill, left short.

Array<object> | null
object
alternate

The choice alternate the role belongs to, choice/alternate; empty when unconditional.

string
count
required

How many simulated components the role gets: its quorum, at least one, capped at its capacity.

integer format: int64
missing

How many the role stays short when nothing simulated fits.

integer format: int64
product

The simulated product chosen for the role; empty when nothing simulated fits.

string
reason

Why the role is left unstaffed.

string
role
required
string
Example
{
"$schema": "/api/v1/schemas/AddSimSystemOutputBody.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"
}