To call any of these methods, send a POST request to this url with encoded JSON according to the JSON RPC 2.0 spec.
The 'params' value should be specified by-name (i.e. as a JS object).
Batch requests are supported.
Use the following form to send JSONRPC requests
The following methods are available
Add samples to a sampler.
samples should be a list of samples, where a sample consists of the timestamp (epoch time) and value.
e.g:
samples = [[12342345, 123], [25324365.0, 420.0]]** NOTE ** We are using this for both backward compatibility, and as a temporary fix to read disk samples into the system.
| Parameter | Purpose | Default | Required? |
|---|---|---|---|
| device_class | device class to use | – | Yes |
| sampler_name | name of sampler | – | Yes |
| samples | list of samples | – | Yes |
| serial | device serial number | – | Yes |
Check credentials and authorize the rest of the batch requests.
| Parameter | Purpose | Default | Required? |
|---|---|---|---|
| auth_token | An authorization token | – | Yes |
| device_class | – | Yes | |
| serial | – | Yes | |
| sync_id | null | No |
Check for new firmware.
| Parameter | Purpose | Default | Required? |
|---|---|---|---|
| current_version | Version number of the current firmware | – | Yes |
Let us know what agent_version the device uses.
| Parameter | Purpose | Default | Required? |
|---|---|---|---|
| agent_version | The version of dataplicity | – | Yes |
Let us know the disk capacity and amount used.
| Parameter | Purpose | Default | Required? |
|---|---|---|---|
| disk_capacity | Capacity of disk in bytes | – | Yes |
| disk_used | Amount of disk used in bytes | – | Yes |
Let the server know which firmware the device is running.
| Parameter | Purpose | Default | Required? |
|---|---|---|---|
| version | Firmware version | – | Yes |
Save the IP addresses of the device
| Parameter | Purpose | Default | Required? |
|---|---|---|---|
| ip_list | A list of all ip address on the device | – | Yes |
Sets tags on the device defined by the machine
| Parameter | Purpose | Default | Required? |
|---|---|---|---|
| tag_list | A list of tag names | – | Yes |
Let us know what the revision code of the machine is.
| Parameter | Purpose | Default | Required? |
|---|---|---|---|
| revision_code | The revision code of the machine | – | Yes |
*Deprecated call, only used on old versions of the agent* The agent used to send through the machine type, rpi_2b for example. These still match our MACHINE_CHOICES, but there is potential for the old agent to send something not in those choices.
Let us know what type the device is.
| Parameter | Purpose | Default | Required? |
|---|---|---|---|
| machine_type | The type of machine | – | Yes |
| Parameter | Purpose | Default | Required? |
|---|---|---|---|
| model_name | The model name of the machine (for non-RPi devices | – | Yes |
Let us know what OS the device is running.
| Parameter | Purpose | Default | Required? |
|---|---|---|---|
| os_version | The OS version | – | Yes |
Update remote directory.
| Parameter | Purpose | Default | Required? |
|---|---|---|---|
| directory | serialized remote directory | – | Yes |
| file_sizes | Scan includes file sizes | False | No |
Let us know what uname the device presents.
| Parameter | Purpose | Default | Required? |
|---|---|---|---|
| uname | The result of uname. | – | Yes |