Dimitris
Dimitris

Reputation: 15

Fiware Orion-LD Auto Increment Entity Id

An Entity Id is required for each new entity in the broker. In NGSI-LD the format for the Entity Id is urn:ngsi-ld:TemperatureSensor:001.
Is it possible to somehow autoincrement the number of the Entity so that the new Entity can be created programmatically?
For example, provide something like urn:ngsi-ld:TemperatureSensor:* and the new Entity can be created with an auto-incremented Entity Id. Thanks.

Upvotes: 1

Views: 112

Answers (1)

Jose Manuel Cantera
Jose Manuel Cantera

Reputation: 853

The id should be generated by the application itself. You have multiple ways of generating unique ids but I would recommend ids that have some semantics behind so that you can, for instance, infer from an id in which area the sensor is located, who the owner is, etc.

Upvotes: 1

Related Questions