POST /input
Since 0.6
Request
Request body: InputRequest
POST /input request: synthetic input for the playtester.
| Field | Type | Required | Description |
|---|---|---|---|
actions | InputEvent[] | yes | The actions and axes to inject, applied in order. |
Request body: InputEvent
One synthetic input, tagged by type.
| Value | Meaning |
|---|---|
action | A named action, as ctx.input.pressed("jump") reads it. |
axis | A two-axis input, as ctx.input.axis("move") reads it. |
steer | World-frame steering for a harness walking a route. |
mouse | Mouse motion, as a person's mouse gives it: delta pixels every tick, for frames ticks. |
key | One key going down or up, as the window's keyboard sends it. |
Response
Response: InputResponse
POST /input response.
| Field | Type | Present | Description |
|---|---|---|---|
accepted | integer | always | How many of the submitted inputs were applied. |
frame | integer | always | The frame they take effect on: the next tick the sim runs. |
unbound | string[] | sometimes | Names that no entity in the scene consumes, so the caller learns about a typo instead of watching nothing happen. |
Example
curl -X POST "http://127.0.0.1:7700/input" --json @body.json
Start a server with argus run --serve; the port is --port (7700 by default). The request and response fields are in the query API guide.