Add a simulated component
const url = 'https://example.com/api/v1/outposts/example/simulation/components';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"location":"example","name":"example","product":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/outposts/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 outpost: a driver attach where the driver’s inputs are known (only when the platform secret the attach references exists, the community or the credential the face demands, else it falls back), otherwise a reachability probe on a port the profile serves, lifted as the outpost’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. An outpost with no simulator connected is a 409, and a product no profile simulates a 422.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The outpost whose simulator serves the new component
The outpost whose simulator serves the new component
Request Bodyrequired
Section titled “ Request Bodyrequired ”object
A URL to the JSON Schema for this object.
Where the component sits, by name or dotted path
The new component’s name
A product a simulator profile simulates
Responses
Section titled “ Responses ”Created
object
A URL to the JSON Schema for this object.
The loopback address the simulated component answers on.
How many endpoints were created for the collector to reach it.
Example
{ "$schema": "/api/v1/schemas/AddSimComponentOutputBody.json"}default
Section titled “ default ”Error
object
A URL to the JSON Schema for this object.
A human-readable explanation specific to this occurrence of the problem.
Optional list of individual error details
object
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
Error message text
The value at the given location
A URI reference that identifies the specific occurrence of the problem.
HTTP status code
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
A URI reference to human-readable documentation for the error.
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"}