Récupérer les données de mesure
GEThttps://www.beekube.com/api/v1/device/:id/data
Récupérer les données de mesure
Request
Path Parameters
id integerrequired
Identifiant de l'objet
Query Parameters
date stringrequired
Date de début
Example: 2023-10-21 10:05:04
Responses
- 200
- 401
- 404
OK
- application/json
- Schema
- Example (from schema)
Schema
data
object[]
pagination
object
{
"data": [
{
"date": "2023-10-09T11:40:00+02:00",
"value": 11,
"unit": "degres",
"type": "temp_ext"
},
{
"date": "2023-10-09T11:40:00+02:00",
"value": 31.7,
"unit": "kilogram",
"type": "weight"
},
{
"date": "2023-10-10T11:40:00+02:00",
"value": 9,
"unit": "degres",
"type": "temp_ext"
},
{
"date": "2023-10-10T11:40:00+02:00",
"value": 32.7,
"unit": "kilogram",
"type": "weight"
},
{
"date": "2023-10-11T11:40:00+02:00",
"value": 11,
"unit": "degres",
"type": "temp_ext"
},
{
"date": "2023-10-11T11:40:00+02:00",
"value": 34.7,
"unit": "kilogram",
"type": "weight"
},
{
"date": "2023-11-09T11:40:00+01:00",
"value": 11,
"unit": "degres",
"type": "temp_ext"
},
{
"date": "2023-11-09T11:40:00+01:00",
"value": 31.7,
"unit": "kilogram",
"type": "weight"
},
{
"date": "2023-11-10T11:40:00+01:00",
"value": 9,
"unit": "degres",
"type": "temp_ext"
},
{
"date": "2023-11-10T11:40:00+01:00",
"value": 32.7,
"unit": "kilogram",
"type": "weight"
}
],
"pagination": {
"currentPage": 1,
"maxPage": 2,
"itemPerPage": 10,
"nextPage": 2,
"nextPageUrl": "https://www.beekube.com/api/v1//device/23/data?date=2023-09-01&page=2",
"previousPage": null,
"previousPageUrl": null
}
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
code integer
Code d'erreur
message string
Message de l'erreur
details integer[]
Informations supplémentaires
{
"code": 0,
"message": "string",
"details": [
0
]
}
{
"error": {
"code": 401,
"message": "Unauthorized",
"details": []
}
}
Device inconnu
- application/json
- Schema
- Example (from schema)
- Example
Schema
code integer
Code d'erreur
message string
Message de l'erreur
details integer[]
Informations supplémentaires
{
"code": 0,
"message": "string",
"details": [
0
]
}
{
"error": {
"code": 404,
"message": "Not Found: Device inconnu",
"details": []
}
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L 'https://www.beekube.com/api/v1/device/:id/data' \
-H 'Accept: application/json' \
-H 'X-API-KEY: <API_KEY_VALUE>'
ResponseClear