For what it's worth, I was able to retrieve the device registry using the web socket api.
Base docs: https://developers.home-assistant.io/docs/api/websocket/
Then send a message with type "config/device_registry/list" (or entity_registry etc.)