Open
Description
Provisioning a Sensor
3️⃣ Request:
will result in the following error:
Please tell me how to avoid it.
$ curl -iX POST \
> 'http://localhost:4041/iot/devices' \
> -H 'Content-Type: application/json' \
> -H 'fiware-service: openiot' \
> -H 'fiware-servicepath: /' \
> -d '{
> "devices": [
> {
> "device_id": "motion001",
> "entity_name": "urn:ngsi-ld:Motion:001",
> "entity_type": "Motion",
> "timezone": "Europe/Berlin",
> "attributes": [
> { "object_id": "c", "name": "count", "type": "Integer" }
> ],
> "static_attributes": [
> { "name":"refStore", "type": "Relationship", "value": "urn:ngsi-ld:Store:001"}
> ]
> }
> ]
> }
> '
HTTP/1.1 500 Internal Server Error
X-Powered-By: Express
Fiware-Correlator: 463d0a57-1870-48c2-b709-d14766ea674f
Content-Type: application/json; charset=utf-8
Content-Length: 83
ETag: W/"53-yJOco57zUHHICXOIMQuA66DVpBQ"
Date: Thu, 12 Jan 2023 15:35:41 GMT
Connection: keep-alive
Keep-Alive: timeout=5
{"name":"TypeError","message":"Cannot read properties of undefined (reading 'id')"}
Metadata
Metadata
Assignees
Labels
No labels