Get the simulated fleet
const url = 'https://example.com/api/v1/simulation';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/simulationEvery node a simulator has pulled for since the server started, each with its capabilities, its account of impairments, and the components it simulates within the caller’s component read scope, joined to their live hits. A caller sees a node’s simulator when its component read scope holds at least one component the node simulates (an all-scope reader sees all of them); no node read is needed. Connected is true when any listed simulator pulled recently. Hits are per server process, not stored. Gated by simulation:read.
Responses
Section titled “ Responses ”OK
object
A URL to the JSON Schema for this object.
Any simulator pulled its device list recently; the console shows its Simulation page only then.
Each node a simulator has pulled for since the server started, whose simulated components the caller’s scope reaches.
object
object
The components the simulator serves, in the caller’s component read scope, with their live hits.
object
The host the component’s endpoints target.
The component’s name.
Connections and requests the simulated device has answered since the server started.
object
Whether the simulator reported applying an impairment to the device in its latest batch.
What an operator has broken on the device; absent when healthy.
object
A URL to the JSON Schema for this object.
Variation on the delay, in milliseconds; at most the latency
Delay added to traffic toward the device, in milliseconds
Share of packets toward the device dropped, in percent, to hundredths
Bandwidth limit on the device’s link, both ways, in kilobits per second; 0 is unlimited
Dark on every protocol: connects time out, datagrams and pings go unanswered
The component’s product; its name selects the simulator profile.
Whether the simulator reported serving this component in its latest batch.
What the simulator is doing with the component, most urgent first: offline (its simulator stopped reporting), starting (added since the simulator’s last pull, or handed over moments ago), failed (handed to the simulator but not started), running.
object
Example
{ "$schema": "/api/v1/schemas/SimFleetOutputBody.json", "nodes": [ { "components": [ { "impairment": { "$schema": "/api/v1/schemas/ImpairmentFields.json" }, "status": "running" } ] } ]}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"}