mirror of
https://github.com/ConnectedHumber/Air-Quality-Web
synced 2024-12-21 10:25:00 +00:00
API docs/device-data: Add examples
This commit is contained in:
parent
aa3abc39eb
commit
1915441ef8
1 changed files with 6 additions and 0 deletions
|
@ -159,6 +159,12 @@ Parameter | Type | Meaning
|
|||
`average-seconds` | int | Optional. If specified, readings will be grouped into lumps of this many seconds and averaged. For example a value of 3600 (1 hour) will return 1 data point per hour, with the value of each point an average of all the readings for that hour.
|
||||
`format` | string | Optional. Specifies the format that the response will be returned in. Valid values: `json`, `csv`. Default: `json`.
|
||||
|
||||
```
|
||||
https://example.com/path/to/api.php?action=device-data&device-id=18&reading-type=PM25&start=2019-01-19T18:14:59.992Z&end=2019-01-20T18:14:59.992Z
|
||||
https://example.com/path/to/api.php?action=device-data&device-id=18&reading-type=PM25&start=2019-01-19T18:14:59.992Z&end=2019-01-20T18:14:59.992Z&average-seconds=3600
|
||||
https://example.com/path/to/api.php?action=device-data&device-id=18&reading-type=PM25&start=2019-01-19T18:14:59.992Z&end=now&average-seconds=3600&format=csv
|
||||
```
|
||||
|
||||
|
||||
### changelog
|
||||
> Gets the changelog as a fragment of HTML.
|
||||
|
|
Loading…
Reference in a new issue