Breaking Changes in thingsHub 5.4
This document describes the changes that a user must be aware of when upgrading from thingsHub 5.3 to thingsHub 5.4:
Changes to the /api/v3/users
endpoint:
The User listing endpoint /api/v3/users
has been updated to return a paginated list of users instead of a simple array.
Before:
CODE[ { "country": "USA", "created_at": "2024-07-08T17:42:47.085Z", "email": "john.doe@example.com", "failed_login_attempts": 0, "full_name": "John Doe", "id": 123, "is_locked": false, "is_system_user": false, "last_login_at": "2024-07-08T17:42:47.085Z", "updated_at": "2024-07-08T17:42:47.085Z", "username": "johndoe" }, ... ]
After:
CODE{ "count": 10, "page": 1, "total_count": 100, "total_pages": 10, "collection": [ { "country": "USA", "created_at": "2024-07-08T17:42:47.085Z", "email": "john.doe@example.com", "failed_login_attempts": 0, "full_name": "John Doe", "id": 123, "is_locked": false, "is_system_user": false, "last_login_at": "2024-07-08T17:42:47.085Z", "updated_at": "2024-07-08T17:42:47.085Z", "username": "johndoe" }, ... ] }
Key changes:
The endpoint
/api/v3/users
now returns a paginated response, providing the user list in acollection
field instead of the first level of the json response.
Required Actions:
If you are a thingsHub API user:
Update your application to handle paginated responses from the
/api/v3/users
endpoint.Modify your code to process the new structure of user data as outlined in the updated API response.
If your application uses the /api/v3/users
endpoint, ensure these changes are implemented before upgrading to thingsHub 5.4.