Device Resource
Danger
This is historical documentation, and tooling and console operations are no longer available.
A Device instance represents a single Microvisor-empowered IoT device. For clarity, device (no cap) refers to physical hardware. Device (initial cap) refers to a Device API resource.
Device resources are accessed at this endpoint:
https://microvisor.com/v1/Devices
Make a GET request to the endpoint to receive a list (in JSON) of all Device resources.
Every Device instance can be referenced in the API either by its unique ID or a user-defined unique name:
https://microvisor.com/v1/Devices/{id}
https://microvisor.com/v1/Devices/{uniqueName}
The Device instance representing a real device is used to deploy uploaded code to that device.
Status Values
The table below describes the available status values of a Device instance:
Status |
Description |
|---|---|
|
The device has received with the most recent application code deployed to it |
|
Application code has been marked for deployment but has yet to be installed on |
|
Application code marked for deployment could not be downloaded for some reason |
Get all Devices
Action |
Request a list of all Device resources |
Path |
|
Method |
|
Get a Device
Action |
Request a single Device resource |
Path |
|
Method |
|
Parameters |
Name: |
Update a Device
Action |
Give a Device a memorable name |
Path |
|
Method |
|
Parameters |
Name: |
Note
Remember, a Device can be identified either by is ID, or by its unique name, if you have applied one.
Deploy to a Device
Action |
Deploy an App to the Device |
Path |
|
Method |
|
Parameters |
Name: |
Enable Logging from a Device
Action |
Enable application code logging |
Path |
|
Method |
|
Parameters |
Name: |
Note
Application code logging is currently enabled by default.
Restart a Device’s App
Action |
Restart an App on a Device |
Path |
|
Method |
|
Parameters |
Name: |
Restarting an app using this call will instruct Microvisor to start the loaded application afresh. This can be a useful call to make during remote debugging, particularly if your application is experiencing unexpected behavior right after it starts.