Expose device ID in container, or allow API calls via UUID?

The Resin API device endpoint needs to be called with the specific device ID (integer). However, this ID isn’t available to running containers, (only RESIN_DEVICE_UUID), so an additional API call needs to be made (filtering all devices for the UUID) in order to determine the ID. This adds unnecessary friction to the experience, and requires me to maintain additional local state in order to talk to the device API.

Could the device ID be exposed to the containers as e.g. RESIN_DEVICE_ID?

Alternatively, could the API be modified to accept either a UUID or an ID? e.g. https://api.resin.io/v4/device(UUID)

1 Like