In this release

ProptechOS agent management functionality is expanded with application management. Applications like persons can be registered in the ProptechOS system, can be granted with resource permission policies and roles.

New functionality

Application

Application – represents an application agent that can authenticate into ProptechOS and use the API for its own purposes. In order to access ProptechOS API Application should be assigned with API scopes. If the application is going to be a UI application it should be assigned with ‘Delegated’ scope and in that case redirectUris should be populated. In case if the application will use client credential flow it should be assigned with Application scope. In order to build the correct application with client credential flow client secret will come in hand. ProptechOS API allows generating client secrets for each created application. Client secret duration time equals 24 months. When a secret expires a new API call will generate a new secret but before expiration date the existing secret will be fetched. Application management is allowed for admin roles only.

New endpoints for application management:

  • GET /json/application – get applications
  • GET /json/application/{id} – get single application
  • GET /json/application/{id}/secret – get secret for single application
  • POST /json/application – create new application
  • PUT /json/application – update full application
  • PUT /json/application/{id}/grant/rpp – grant person with resource permission policies;
  • PUT /json/application/{id}/revoke/rpp – revoke from person resource permission policies;
  • PUT /json/person/{id}/grant/role – grant person with roles;
  • PUT /json/person/{id}/revoke/role – revoke from person roles;
  • POST /json/application/register (register existing application in ProptechOS – for Global Admin only)

Application json schema:

{
“id”: “3fa85f64-5717-4562-b3fc-2c963f66afa6“,
“resourcePermissionPolicies”: [
3fa85f64-5717-4562-b3fc-2c963f66afa6
],
“organization”: null,
“roles”: [
3fa85f64-5717-4562-b3fc-2c963f66afa6
],
“displayName”: “My Test – App“,
“identifierUri”: “https://proptechos.com/test-app“,
“logoutUrl”: null,
“permissionScopes”: null,
“redirectUris”: [“https://my-test-app.com/home”],
“scopes”: [“Delegated”,”Application”],
“popularName”: “My Test – App“,
“status”: “Valid“,
“createdByAgent”: “[email protected]“,
“updatedByAgent”: null,
“createdTime”: “2022-03-02T09:31:45.065Z“,
“updatedTime”: null,
“comment”: null,
“source”: null,
“defaultPropertyOwner”: “3fa85f64-5717-4562-b3fc-2c963f66afa6“,
“class”: “Application
}

Client secret json schema:

{
“clientId”: “3fa85f64-5717-4562-b3fc-2c963f66afa6“,
“clientSecret”: “string“,
“startTime”: “2022-10-05T10:03:00.262Z“,
“endTime”: “2022-10-05T10:03:00.262Z
}

Improved twin lifecycle management with extended Archived state

Retrieving of archived twins are introduced, meaning that API endpoints for GET requests should return archived twins, but only if “twinStatus” in the query contains the “Archived” value.

The list of APIs that support the feature:

  • RealEstate
  • RealEstate Component
  • BuildingComponent
  • Room
  • Storey
  • Asset
  • Device
  • Sensor
  • Actuator
  • ActoationInterface
  • Apartment
  • SpaceCollection
  • Twin

The example of query to fetch archived twins:
GET /api/json/asset?twin_statuses=Archived&page=0&size=50
GET /api/json/device?twin_statuses=Archived&page=0&size=50
GET /api/json/device/6460d05b-a3b3-4d9a-b1cd-9581da77f5e2

It is not possible to update or delete(archive) archived twins, so PUT and DELETE(with hard=false) operations will be unsuccessful.

Breaking changes

None.

Fixes and minor updated

None.