Récupérer les données de mesure
GET/device/:id/data
Récupérer les données de mesure
Request
Path Parameters
Identifiant de l'objet
Query Parameters
Date de début
Responses
- 200
- 401
- 404
OK
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
data
object[]
Donnée
Possible values: Value must match regular expression [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}(?::[0-9]{2})?
Date de la mesure : 2023-12-21 10:11:01
Valeur de la mesure
Possible values: [degres
, gram
, kilogram
, pourcentage
, volt
]
Unité de la mesure
Possible values: [temp_ext
, temp_int
, hygro_ext
, hygro_int
, weight
, device_signal
, device_battery
]
Type de mesure
pagination
object
Page actuelle
Nombre de page maximum
Nombre maximum d'item par page
Numéro de la page suivante
URL de la page suivante
Numéro de la page précédente
URL de la page précédente
{
"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 d'erreur
Message de l'erreur
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 d'erreur
Message de l'erreur
Informations supplémentaires
{
"code": 0,
"message": "string",
"details": [
0
]
}
{
"error": {
"code": 404,
"message": "Not Found: Device inconnu",
"details": []
}
}