← iot API
DeviceComponentDefinitions
Singular: DeviceComponentDefinition — Base-URL: https://iot.ayoune.app — Zugriff: CRUD — Maschinenlesbare Beschreibung (JSON · YAML)
Jetzt ausprobieren
beta
Response (live)
Requests werden über den consumer-app Proxy an *.ayoune.app weitergeleitet. Tokens bleiben im Browser und werden pro Call mitgesendet.
Beispiel-Response (aufgezeichnet) Beispiel
Eine echte, zuvor aufgezeichnete GET /:id-Antwort dieses Endpunkts — nicht der Live-Call oben. Sensible Felder sind maskiert.
{
"payload": {
"_id": "6aa7ebf1d590f2e15fd4c2e4",
"key": "bh1750",
"category": "sensor",
"codegenBinding": {
"driverKind": "builtin",
"header": "bh1750.h",
"component": "bh1750",
"cfgType": "ayoune_bh1750_cfg_t",
"initFn": "ayoune_bh1750_init",
"readFn": "ayoune_bh1750_read",
"metaFields": [
"light_ch"
],
"defaultChannels": [
{
"name": "light_lux",
"label": "Helligkeit",
"unit": "lx"
}
],
"maxChannels": 1
},
"createdAt": "2026-09-14T12:43:29.441Z",
"label": "BH1750 Helligkeit (ESP32)",
"measures": [
{
"key": "light_lux",
"unit": "lx",
"kind": "number",
"aggregation": "avg",
"label": "Helligkeit"
}
],
"paramsSchema": [
{
"key": "sda",
"type": "pin",
"required": true,
"values": [],
"path": "i2c.sda",
"label": "I²C SDA"
},
{
"key": "scl",
"type": "pin",
"required": true,
"values": [],
"path": "i2c.scl",
"label": "I²C SCL"
},
{
"key": "address",
"type": "hex",
"default": 35,
"values": [],
"path": "i2c.address",
"label": "I²C-Adresse"
},
{
"key": "i2c_port",
"type": "int",
"default": 0,
"values": [],
"path": "i2c.port",
"label": "I²C-Port"
}
],
"reviewState": "approved",
"shares": [],
"status": "published",
"surfaces": {
"live": "value",
"config": false
},
"targetPlatform": "esp32",
"updatedAt": "2026-10-06T07:23:52.276Z",
"version": 6
},
"meta": {
"links": [
{
"rel": "self",
"href": "https://iot.ayoune.app/devicecomponentdefinitions/6aa7ebf1d590f2e15fd4c2e4",
"method": "get",
"title": "GET",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"relations": [],
"debugId": "6ac9b902c4e26385ce2c314d",
"errors": [],
"actions": [],
"version": {
"host": "2026.46.0",
"core": "2026.368.1"
},
"rateLimit": {
"limit": "10000",
"remaining": "9953",
"reset": "1791607692",
"resetDate": "Sat Oct 10 2026"
},
"responseTime": 15.460369,
"code": 200,
"status": "success",
"error": false
}
}
Endpunkte
| Methode | Path | Beschreibung | Right |
|---|---|---|---|
| GET | /devicecomponentdefinitions |
Liste mit Filtern/Paginierung | iot.devicecomponentdefinitions.view |
| GET | /devicecomponentdefinitions/:id |
Einzelner Datensatz | iot.devicecomponentdefinitions.view |
| POST | /devicecomponentdefinitions |
Neuen Datensatz erstellen | iot.devicecomponentdefinitions.new |
| PUT | /devicecomponentdefinitions |
Datensatz aktualisieren | iot.devicecomponentdefinitions.edit |
| DELETE | /devicecomponentdefinitions/:id |
Datensatz löschen | iot.devicecomponentdefinitions.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// Alle abrufen
const list = await ay.iot.deviceComponentDefinitions.find().limit(10).exec();
// Einzelnen Datensatz
const one = await ay.iot.deviceComponentDefinitions.findById('OBJECT_ID').exec();
// Erstellen
const created = await ay.iot.deviceComponentDefinitions.create({ name: 'Foo' });