I have designed my own webthings (framework, python) to control DIY LEDs from a Raspberry Pi 0. It works.
I have set-up a gateway 12.0 on a Raspberry Pi 4. It works.
I am now learning my way through creating an add-on, the purpose of which is to replace the Things view (eventually) (for my Gateway).
One piece of information that does not seem to bubble up in the gateway from my native webthings is their “id”. The solution I found is to either use API.getThings in the extension.js cient script or localhost/things in the API Handler, from this, find out a list of webthing servers, then request things from the webthing servers (from the API handler), collect the relevant information and pass it back on to the client - not withstanding changes to the list of things.
It seems convoluted, I have the impression that I am missing something obvious - maybe I overlooked an API function or two that allow to list all things, including their original id. I develop the backend in python, but I must have searched through both the add-on python API and the client javascript API dozens of times in vain.
Hoping someone has an easier, more efficient answer to my search.