Fire an operation at a simulated component
const url = 'https://example.com/api/v1/components/example/simulation:fire';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"body":"example","command":"example","method":"example","oid":"example","path":"example","surface":"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/components/example/simulation:fire \ --header 'Content-Type: application/json' \ --data '{ "body": "example", "command": "example", "method": "example", "oid": "example", "path": "example", "surface": "example" }'Asks the simulator beside the component’s node to run one operation against the simulated component, on one of its protocol surfaces: an HTTP call, a command line (SSH, Telnet, TCP) or an SNMP get, and returns its answer. The simulator answers from the component’s live state in process, as its listeners would, so a command’s change sticks and the collector sees it; an impairment does not stop it. Audited. Gated by simulation:update, resolved on the component tier. A component that is not simulated is a 409, a surface it does not serve a 422, and no simulator answering a 503.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The simulated component’s name, or a dotted address
The simulated component’s name, or a dotted address
Request Body required
Section titled “Request Body required ”object
A URL to the JSON Schema for this object.
HTTP: the request body
SSH, Telnet or TCP: the command line
HTTP: the method; GET when empty
SNMP: the OID to get
HTTP: the request path
The surface to fire on, by its name in the component’s surface list
Responses
Section titled “ Responses ”OK
object
A URL to the JSON Schema for this object.
Example
{ "$schema": "/api/v1/schemas/SimOperationResult.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"}