Skip to content

Entity Id aliases #161

@j-forster

Description

@j-forster

The idea of name aliases is taken from docker images tags.

Right now, Waziup sensor-, actuator- and device-Ids can be any arbitrary string when creating any entity.
However, strong unique Ids (either serial or random) should be preferred to avoid Id collisions and to improve database fields (to favor primitive integer keys over string keys).

For that, the server should no longer accept user-defined Ids as entity Ids.

To maintain backwards compatibility, I would like to introduce name aliases.
Name aliases can be used instead of entity Ids at any place (e.g. at URL on API calls). Each entity can have a (maybe empty) set of name aliases, and can be addressed by any of that name. Names can be added or removed from the set through new API endpoints.
Existing endpoints that allow the creation of entities with a specific Id will use that Id as an alias, making it possible to used the initial Id/alias instead of a real Id.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions