thingsHub Public Documentation

Breaking Changes in thingsHub 5.2

This document describes the changes that a user must be aware of when upgrading from thingsHub 5.1 to thingsHub 5.2:

Changes to the POST /api/v3/assets endpoint:

The response structure for successful creation via the POST /api/v3/assets endpoint has been updated to return a single asset object instead of an array containing one object, which is consistent to REST API standards.

  1. Before:

    [
      {
        "description": "Description of the asset",
        "id": "unique-id-of-asset",
        "metadata": {},
        "name": "Name of the Asset"
      }
    ]
    
  2. After:

    {
      "description": "Description of the asset",
      "id": "unique-id-of-asset",
      "metadata": {},
      "name": "Name of the Asset"
    }
    

Key changes:

  • The POST /api/v3/assets endpoint now returns a single asset object directly upon successful creation, rather than an array with one object.

Required Actions:

  • Update your application to handle the new response structure when creating assets via the /api/v3/assets endpoint.

  • Adjust any code that processes the response from this endpoint to expect a single object instead of an array with one object.

If your application interacts with the /api/v3/assets API endpoint, ensure these changes are implemented before upgrading to thingsHub 5.2.