Update /apt/history

This commit is contained in:
Fabian Affolter 2016-12-29 19:50:32 +01:00
parent 90b8600c74
commit 3f3828e009
No known key found for this signature in database
GPG Key ID: E23CD2DD36A4397F

View File

@ -192,7 +192,7 @@ $ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \
-H "Content-Type: application/json" http://localhost:8123/api/services -H "Content-Type: application/json" http://localhost:8123/api/services
``` ```
#### {% linkable_title GET /api/history %} #### {% linkable_title GET /api/history/period/<timestamp> %}
Returns an array of state changes in the past. Each object contains further details for the entities. Returns an array of state changes in the past. Each object contains further details for the entities.
```json ```json
@ -227,13 +227,13 @@ Sample `curl` commands:
```bash ```bash
$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \ $ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
http://localhost:8123/api/history/period/2016-02-06 http://localhost:8123/api/history/period/2016-12-29T00:00:00+02:00
``` ```
```bash ```bash
$ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \ $ curl -X GET -H "x-ha-access: YOUR_PASSWORD" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
http://localhost:8123/api/history/period/2016-02-06?filter_entity_id=sensor.temperature http://localhost:8123/api/history/period/2016-12-29T00:00:00+02:00?filter_entity_id=sensor.temperature
``` ```
#### {% linkable_title GET /api/states %} #### {% linkable_title GET /api/states %}