In this release

We introduce breaking changes for Real Estate and Real Estate Component objects related to addresses. Address from this release on will be a separate class and Real Estate and Real Estate Component will now contain a list of address IDs instead of objects.

New organization management endpoints are introduced, available for users with PropertyOwnerAdmin and OrganizationAdmin roles.

Improvements to Agent management are implemented in this release.

Device edge status, based on its subdevices edge statuses.

New functionality

1. Organization

In scope of current release Organization management was introduced on API.

New endpoints:

  • GET /json/organization – retrieve all organizations
  • PUT /json/organization – update existing full organization
  • POST /json/organization – create a new organization
  • GET /json/organization/{id} – find specific organization
  • DELETE /json/organization/{id} – delete specific organization
  • PUT /json/organization/{id}/grant/rpp – grant organization with new RPP
  • PUT /json/organization/{id}/revoke/rpp – revoke RPP from organization
  • PUT /json/organization/{id}/include/person – include members to organization
  • PUT /json/organization/{id}/include/application – include applications to organization
  • PUT /json/organization/{id}/exclude/person – exclude persons from organization
  • PUT /json/organization/{id}/exclude/application – exclude applications from organization.

All organizations should belong to a Property Owner. Also, for organization were implemented limited functionality for different roles PropertyOwnerAdmin, OrganizationAdmin and User.

As a PropertyOwnerAdmin user has access to all the organization management endpoints, but with the following limitations:

  1. New organization can be only created with the same PO.
  2. User can include/exclude members and applications that are accessible from the PO Admin role.
  3. PO Admin can grant/revoke RPP with appropriate permissions.

As a OrganizationAdmin user has access to only a few endpoints:

  1. GET endpoints return only organizations that can be managed to OrganizationAdmin.
  2. It is not possible to create a new organization with this role.
  3. There is no permission to include/exclude members and applications to the organization.
  4. Organization Admin can grant/revoke RPP with appropriate permissions.

As a User person can only access GET endpoints, to check own organization under the PO.

General rules for all roles:

  1. It is no longer possible to update RPP, members and applications with usage of full update endpoint.
  2. It is not possible to add a member or application to an organization if it is already added to a different organization under the same PO.

All these endpoints are also available in the JSON-LD section.

Request example:

  • PUT api/json/organization/3fa85f64-5717-4562-b3fc-2c963f66afa6/include/person

[

“3fa85f64-5717-4562-b3fc-2c963f66afa6”

]

2. Agent improvements

2.1 Users will be able to change their Default Property Owner, but only in case when the user has access to the chosen Property Owner (via resource permission policies, roles).

2.2 Added the opportunity to filter persons by popular_name’.

2.3 Agent now can be a member of multiple organizations, but only if those organizations are in different Property Owners. Update of organization is no longer available through full Agent update, there are new specific endpoints for such purpose:

  • PUT /json/person/{id}/member/{organizationId} – Set organization field for Person.
  • DELETE /json/person/{id}/member/{organizationId} – Delete organization field for Person.
  • PUT /json/application/{id}/member/{organizationId} – Set organization field for Application.
  • DELETE /json/application/{id}/member/{organizationId} – Delete organization field for Application.

Also, this functionality is only available for PropertyOwnerAdmin role.

Request examples:

  • PUT /api/json/person/3fa85f64-5717-4562-b3fc-2c963f66afa6/member/3fa85f64-5717-4562-b3fc-2c963f66afa6
  • PUT /api/json/application/3fa85f64-5717-4562-b3fc-2c963f66afa6/member/3fa85f64-5717-4562-b3fc-2c963f66afa6
  • DELETE /api/json/person/3fa85f64-5717-4562-b3fc-2c963f66afa6/member/3fa85f64-5717-4562-b3fc-2c963f66afa6
  • DELTE /api/json/application/3fa85f64-5717-4562-b3fc-2c963f66afa6/member/3fa85f64-5717-4562-b3fc-2c963f66afa6

3. Device edge status

For the Devices, new endpoints are available.

  • GET /json/device/{id}/edgestatus
  • GET /device/{id}/edgestatus

The logic for determining the device’s edge status is based on its sensor’s edge statuses.

Device has next edge statuses:

OK if at least one subdevice is in OK state

WARM_UPif all subdevices are in WARM_UP state

WARNINGif at least one subdevice is in either ERROR or WARNING state, or if all subdevices are in WARNING state.

ERROR if all subdevices are in ERROR state.

NOT_STARTEDif all subdevices are in NOT_STARTED state, plus this is the initial status of the device.

4. Address

In scope of this release Address was introduced as a separate twin to improve usability and reuse addresses for different Real Estates and Real Estate Components. Now RE and REC objects contain a list of UUIDs of address objects. There were new endpoints added:

  • GET /json/address – Find address based on filter
  • PUT /json/address – Update existing full address
  • POST /json/address – Create a new address
  • PUT /json/address/{id}/restore – Restore specific address
  • GET /json/address/{id} – Find specific address
  • DELETE /json/address/{id} – Delete specific address

Also to simplify work with Real Estates and Real Estate Components there were implemented new endpoints that return not only Address UUID, but the list of full Address objects.

  • GET /json/realestate/{id}/addresses – Find specific real estate addresses
  • GET /json/realestatecomponent/{id}/addresses – Find specific real estate component addresses

For example:

[
  {
    “type”: null,
    “id”: “3ff24fe7-4515-42e4-8300-81e9d7dd066c”,
    “status”: “Valid”,
    “createdTime”: null,
    “updatedTime”: “2022-12-28T13:04:49.987Z”,
    “popularName”: null,
    “createdByAgent”: null,
    “updatedByAgent”: “[email protected]”,
    “comment”: null,
    “source”: null,
    “class”: “Address”,
    “streetAddress”: “123 Main st.”,
    “postalCode”: “12345-6789”,
    “countryName”: “Sweden”,
    “locality”: null,
    “region”: null
  }
]

Breaking changes

RE and REC objects no longer contain a list of Address objects, but a list of Address IDs.

For example:

GET/json/realestatecomponent/791f4427-eac8-4437-b2de-7a1e7781b4e5

    {
      “class”: “Building”,
      “addresses”: [
        “3ff24fe7-4515-42e4-8300-81e9d7dd0669”
      ],
      “areaQuantities”: [
        {
          “type”: “LOA”,
          “value”: 260,
          “measurementUnit”: “https://w3id.org/rec/core/SquareMeter”
        }
    ],
    “id”: “791f4427-eac8-4437-b2de-7a1e7781b4e5”,
    “status”: “Valid”,
    “createdTime”: “2022-11-04T14:45:26.632Z”,
    “updatedTime”: “2022-12-02T10:11:54.973Z”,
    “popularName”: “Test basic info”,
    “createdByAgent”: “[email protected]”,
    “updatedByAgent”: “[email protected]”,
    “comment”: {},
    “source”: {},
    “hasAlias”: [],
    “littera”: null,
    “isPartOfRealEstate”: “c508b827-dd9b-49d2-9cfb-e749de31e2b7”,
    “hasGeoReferenceOrigo”: “53.553134696668246;10.018278789200911;0”
}

Fixes and minor updates (internal links are added only for reference)

Fixed bugs:

  1. PLAT-3617 – Non Global User can’t restore archived device;
  2. PLAT-3627 – Ignored non-mandatory relations on hard delete;
  3. PLAT-3603 – Keep relations to archived orphans;
  4. PLAT-3352 – Unable to bulk update roomTypes on Multitenant with Drafting Engineer access;

Improvements:

  1. PLAT-3273 – Forbid deletion of Alias namespaces and Actuation Interfaces that have relations;
  2. PLAT-3237 – Add validation of Alias base URL for creating and updating axioms;
  3. PLAT-3425 – Optimize latest observation request performance;
  4. PLAT-3577 – Investigate possibility to improve speed of deletion of axioms;
  5. PLAT-3467 – Extended invitation object with ‘countryName’ property.