Skip to content

Add a simulated component

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

Creates a component of a simulated product, at the lowest free address in the simulated block (127.60.0.0/16), with the endpoint the collector reaches it through placed on the node: a driver attach where the driver’s inputs are known (an SNMP attach needs the sim-community secret, else it falls back), otherwise a reachability probe on a port the profile serves, lifted as the node’s simulator lifts its ports. The simulator serves it from its next pull, with no restart. Gated by simulation:update, and also needs component:create and endpoint:create, each in the caller’s own scope. A node with no simulator connected is a 409, and a product no profile simulates a 422.

name
required

The node whose simulator serves the new component

string

The node whose simulator serves the new component

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
location

Where the component sits, by name or dotted path

string
name
required

The new component’s name

string
>= 1 characters
product
required

A product a simulator profile simulates

string
>= 1 characters

Created

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
address
required

The loopback address the simulated component answers on.

string
component
required
string
endpoints
required

How many endpoints were created for the collector to reach it.

integer format: int64
node
required
string
Example
{
"$schema": "/api/v1/schemas/AddSimComponentOutputBody.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"
}