You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by No9 May 25, 2025
Currently the device details page is made available through the internal guid in the navigation path.
e.g. https://cloud.shellhub.io/devices/d1ae8d18090f7cb30e1bb827ec6775bd586c0394faacc98a7bc4c2990addce4d
This is a bit problematic for 3rd party integrations where an external systems would like to provide a link to the device remote connection capability in shellhub.
The problem is mainly due to some form of sync integration needing to be developed.
These can be brittle and lead to complexity due to features like compensating transactions being required during the device registration. This problem compounds as more backend management systems are added to the device.
However shellhub has a great feature in the registration process that allows for over riding of the hostname using SHELLHUB_PREFERRED_HOSTNAME.
This allows for a shared id to be established across different management systems greatly simplifying this problem.
To bring this full circle it would be great for the UI to support https://cloud.shellhub.io/devices?hostname=SHELLHUB_PREFERRED_HOSTNAME as a navigation feature directly to the device details page.
Let me know any thoughts on this feature.
Proposal: Device Resolution by Attribute
Problem
Today, the device details page in ShellHub is only accessible using the device’s internal UID:
This creates problems for 3rd party systems that need to link to ShellHub. These systems usually know the device by its hostname, not UID. This forces developers to write extra logic to keep data in sync, which makes integration harder.
Goal
Allow users and systems to access the device details page in ShellHub using the hostname instead of the UID, with no extra sync logic.
Proposal Overview
This proposal introduces a generic approach to resolving devices by any supported attribute, not just the hostname. The first version will support hostname, but the structure will allow easy addition of other attributes in the future
This change will need updates to both the API (@shellhub-io/backend-owners) and the UI (@shellhub-io/frontend-owners).
NOTE: In the future, other identifiers like mac or serial_number can be supported with similar query parameters.
If the device is not found, the API returns a 404 error.
UI Route: /devices/:identifier?resolver=hostname
Examples:
By UID (default):/devices/d1ae8d18090f7cb30e1bb827ec6775bd...
By Hostname:/devices/my-device-name?resolver=hostname
Behavior:
If resolver=hostname is in the URL:
The UI calls /api/devices/resolve?hostname=:identifier
Then it redirects or loads /devices/:uid internally to keep the UI behavior the same
If there is no resolver, the UI assumes :identifier is a UID and loads the page directly according to the current behavior.
Benefits
Makes the UI route simple and consistent (/devices/:identifier), regardless of the identifier type
The resolver parameter keeps it clear and explicit what kind of identifier is being used
External systems can generate device links using only the hostname, without needing to fetch the UID first
Reduces integration complexity and removes the need for custom sync logic
The API becomes more flexible by allowing queries using different types of identifiers (hostname, mac, etc.)
Easy to extend the solution in the future, with minimal changes to the API and UI
The text was updated successfully, but these errors were encountered:
gustavosbarreto
changed the title
feat: Enable deeplinks to device details page using hostname
feat: Device Resolution by Hostname Support in ShellHub
May 27, 2025
gustavosbarreto
changed the title
feat: Device Resolution by Hostname Support in ShellHub
feat: Device Resolution by Hostname Support
May 27, 2025
Implement device resolver functionality that allows fetching devices
using attributes beyond the default UID. The new `resolver` query
parameter accepts different attribute types while automatically scoping
results to the current tenant context for security.
Currently supported resolvers:
- uid (default behavior)
- hostname
Example usage: GET /devices/web-server-01?resolver=hostname
Implement device resolver functionality that allows fetching devices
using attributes beyond the default UID. The new `resolver` endpoint
accepts different attribute types while automatically scoping
results to the current tenant context for security.
Currently supported resolvers:
- uid
- hostname
Uh oh!
There was an error while loading. Please reload this page.
Discussed in #4848
Originally posted by No9 May 25, 2025
Currently the device details page is made available through the internal guid in the navigation path.
e.g.
https://cloud.shellhub.io/devices/d1ae8d18090f7cb30e1bb827ec6775bd586c0394faacc98a7bc4c2990addce4d
This is a bit problematic for 3rd party integrations where an external systems would like to provide a link to the device remote connection capability in shellhub.
The problem is mainly due to some form of sync integration needing to be developed.
These can be brittle and lead to complexity due to features like compensating transactions being required during the device registration. This problem compounds as more backend management systems are added to the device.
However shellhub has a great feature in the registration process that allows for over riding of the hostname using
SHELLHUB_PREFERRED_HOSTNAME
.This allows for a shared id to be established across different management systems greatly simplifying this problem.
To bring this full circle it would be great for the UI to support
https://cloud.shellhub.io/devices?hostname=SHELLHUB_PREFERRED_HOSTNAME
as a navigation feature directly to the device details page.Let me know any thoughts on this feature.
Proposal: Device Resolution by Attribute
Problem
Today, the device details page in ShellHub is only accessible using the device’s internal UID:
This creates problems for 3rd party systems that need to link to ShellHub. These systems usually know the device by its hostname, not UID. This forces developers to write extra logic to keep data in sync, which makes integration harder.
Goal
Allow users and systems to access the device details page in ShellHub using the
hostname
instead of theUID
, with no extra sync logic.Proposal Overview
This proposal introduces a generic approach to resolving devices by any supported attribute, not just the hostname. The first version will support hostname, but the structure will allow easy addition of other attributes in the future
This change will need updates to both the API (@shellhub-io/backend-owners) and the UI (@shellhub-io/frontend-owners).
API Endpoint:
/api/devices/resolve
Usage:
Parameters:
Response:
If the device is not found, the API returns a 404 error.
UI Route:
/devices/:identifier?resolver=hostname
Examples:
/devices/d1ae8d18090f7cb30e1bb827ec6775bd...
/devices/my-device-name?resolver=hostname
Behavior:
If
resolver=hostname
is in the URL:/api/devices/resolve?hostname=:identifier
/devices/:uid
internally to keep the UI behavior the sameIf there is no resolver, the UI assumes
:identifier
is a UID and loads the page directly according to the current behavior.Benefits
/devices/:identifier
), regardless of the identifier typeresolver
parameter keeps it clear and explicit what kind of identifier is being usedThe text was updated successfully, but these errors were encountered: