Add a simulated system
const url = 'https://example.com/api/v1/outposts/example/simulation/systems';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"location":"example","name":"example","standard":"example","system_type":"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/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 slot 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 outpost, and assigned its slot, all in one transaction: it lands whole or not at all. Component names are minted as an unnamed create mints them; slots 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, component:update, endpoint:create and outpost:read (and location:read when it names a location), each in the caller’s own scope; the components are created without a parent, so component:create must be all-scope, and so must component:update, since assigning each its slot writes onto it as an assignment route does. A refused piece is mapped as its own route maps it (a component refused is a 403). An outpost with no simulator connected is a 409, and a standard nothing simulated can staff a 422.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The outpost whose simulator serves the system’s components
The outpost whose simulator serves the system’s components
Request Bodyrequired
Section titled “ Request Bodyrequired ”object
A URL to the JSON Schema for this object.
Where the system and its components sit, by name or dotted path
The system’s name; minted from its type when empty
The standard the system is built to; its slots decide the components
The system’s type, which also mints its name when none is given
Responses
Section titled “ Responses ”Created
object
A URL to the JSON Schema for this object.
object
The loopback address the simulated component answers on.
The new system’s id, the stable address a link to it uses.
The slots nothing simulated could fill, left short.
object
The choice alternate the slot belongs to, choice/alternate; empty when unconditional.
How many simulated components the slot gets: its quorum, at least one, capped at its capacity.
How many the slot stays short when nothing simulated fits.
The simulated product chosen for the slot; empty when nothing simulated fits.
Why the slot is left unstaffed.
Example
{ "$schema": "/api/v1/schemas/AddSimSystemOutputBody.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"}