API Release 2020-12-16.03

Wattsense is pleased to announce the general availability of the Wattsense REST API version 2020-12-16.03 on 2021-01-12T23:00:00Z. This is a major release where we revamped user management.

Some of these changes are not retro-compatible, however, they are necessary for the future of the API.

Major Changes (English)

Removal of Organization Units in favor of managed Organizations

During the design of the Organization Units (OU), we had as an objective to allow our clients to create structures in which they can organize their clients. However, we noticed that this design had a limit where users were only manageable via an Organization. To resolve this issue, we made it possible in this release to create a fully-fledged Organization that will be managed by its parent Organization.

From this release and on, you can create a managed Organization, move Boxes around, activate your client’s Boxes, invite users outside of your organization much more easily.

Organization Units were also used to group devices, for this reason, we migrated all Organization Units into a new concept called Device Group.

Impacted APIs

  • /v1/devices:
    • No longer takes organizationUnitId, this was optional.
    • Added organizationId (optional), that allows you to list devices by Organization
    • The result no longer contains organizationUniId, but now will contain organizatId and tenantId (the former is the organization, and the later is the parent organization if the organization is managed)
    • Added deviceGroupId (optional) to filter devices by their device group
  • /v1/organizationUnits no longer exists
  • /v1/notifications and /v1/connect/mqtt have organizationUnitId replaced by organizationId

Changements Majeur (French)

Suppression des Organization Unit au profit des sous-Organization

Lors du design des Organization Units (OU), nous avions comme objectif de permettre à nos clients de créer des sous-structures pour organiser la gestion de leurs clients. Avec le temps, nous nous sommes rendu compte que ces OU présentaient une limite importante, les utilisateurs appartenaient à l’Organization ayant créé l’Organization Unit, et ne permetait pas une indépendance des utilisateurs des OU.

Pour résoudre cette limite nous avons opté pour une suppression du concept des Organization Unit, introduire le concept des Device Groups (permettant de grouper les devices dans des groupes logiques) ainsi que permettre aux Organization de créer d’autres Organizations (leurs clients).

Ainsi, vous pourrez ajouter des utilisateurs et leur donner des droits d’accès à ces Organizations. Sans qu’ils “appartiennent” à votre l’Organization.

API impactées par le changement

  • /v1/devices :
    • Ne prend plus de “organizationUnitId” (optionnel)
    • Ajout de “organizationId” (optionnel) pour filtrer les boxes par Organization
    • Le résultat ne contiendra plus de “organizationUnitId” mais plutot un “organizationId”.
    • Ajout d’un “deviceGroupId” (optionnel) dans les résultats et dans les filtres
  • /v1/notifications et /v1/connector/mqtt
    • Ces entitées seront maintenant liées à “organizationId”
  • /v1/organizationUnits
    • Suppression de cet endpoint