Send a command
Drive your devices around. The set of valid commands depends on device type - see each drone or controller page for the specifics.
Endpoint
POST /v1/devices/{code}
Body parameters
| Name | Type | Description |
|---|---|---|
command | string | Command name. Type-specific. |
...args | any | Each command takes its own arguments inline alongside command. |
Example
# stow a deployed drone back into its host vessel
$ curl -X POST https://api.replicant.space/v1/devices/40ED8A3E \
-H "Authorization: Bearer $API_KEY" \
-d '{"command": "stow"}' {
"device_code": "40ED8A3E",
"status": "stowed"
} Command reference
Each device has a specific list of features available. These features determine what commands it can process. Additional parameters are command-specific. For example, the travel command will require a destination: SOL-3, and the start_mining command will want resource_type: carbon for example.
Full details on the additional parameters for each command can be found in the documentation for the different device types.
| Feature | Commands |
|---|---|
cruise | travel, recall, decommission |
surge | travel |
stow | deploy, stow |
attach | attach, detach |
system_scan | system_scan |
survey | scan |
census | stellar_census |
prospect | prospect |
mine | start_mining, retarget |
transport | collect_resources, deposit_resources |
print | enqueue_print, dequeue_print, clear_queue |
repair | repair |
cradle | replicate |
ami | adopt, release, set_directive, clear_directive, launch, withdraw, activate |
relay | activate |
Universal commands
Every device, regardless of features, accepts the following:
change_owner- reassign the device to another replicant under your account.deactivate- stop whatever the device is currently doing (mining, printing, travel, relaying, etc).
Custom commands
Some device types add their own commands on top of the feature list:
surge_plate-configure.propulsor-activate.system_hub-set_entry_point,rename.