Feature Request - Pull data from another source

Ability to add a note or similar to a weathermap that does a query to another database, ultimately I have another database that states how many access points are connected to a switch, I have the switch the uplinks on the weathermap bout would like to be able to also query the database so you can see what access points are connected to that switch for example. I have been able to add a basic note but how do I adapt this to rather pull a value from a database, hope that makes sense what I am trying to achieve.