Récupérer les données de mesure
GET/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
- Array [
- ]
data object[]
Donnée
date stringnullable
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
value float
Valeur de la mesure
unit string
Possible values: [degres
, gram
, kilogram
, pourcentage
, volt
]
Unité de la mesure
type string
Possible values: [temp_ext
, temp_int
, hygro_ext
, hygro_int
, weight
, device_signal
, device_battery
]
Type de mesure
pagination object
currentPage integer
Page actuelle
maxPage integer
Nombre de page maximum
itemPerPage integer
Nombre maximum d'item par page
nextPage integernullable
Numéro de la page suivante
nextPageUrl stringnullable
URL de la page suivante
previousPage integernullable
Numéro de la page précédente
previousPageUrl stringnullable
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 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": []
}
}
Loading...